Closed m-surowiec closed 4 weeks ago
I fixed the issue when {player} placeholder would return null if leader of the island is offline. Fixed issue #95
{player}
null
Key changes include:
src/main/java/com/bgsoftware/ssboneblock/actions/Action.java
run
OfflinePlayer
Player
src/main/java/com/bgsoftware/ssboneblock/actions/CommandAction.java
src/main/java/com/bgsoftware/ssboneblock/actions/MultiAction.java
src/main/java/com/bgsoftware/ssboneblock/actions/RandomAction.java
src/main/java/com/bgsoftware/ssboneblock/actions/SetBlockAction.java
src/main/java/com/bgsoftware/ssboneblock/actions/SpawnEntityAction.java
src/main/java/com/bgsoftware/ssboneblock/commands/commands/CmdSetPhase.java
setPhaseLevel
asOfflinePlayer
src/main/java/com/bgsoftware/ssboneblock/commands/commands/CmdSetPhaseBlock.java
setPhaseBlock
src/main/java/com/bgsoftware/ssboneblock/handler/PhasesHandler.java
runNextAction
runNextActionTimer
src/main/java/com/bgsoftware/ssboneblock/listeners/IslandsListener.java
I changed it so the method takes SuperiorPlayer as a parameter instead of OfflinePlayer or Player. Thanks for the contribution tho!
SuperiorPlayer
I fixed the issue when
{player}
placeholder would returnnull
if leader of the island is offline. Fixed issue #95Key changes include:
Method Signature Updates:
src/main/java/com/bgsoftware/ssboneblock/actions/Action.java
: Updated therun
method to acceptOfflinePlayer
instead ofPlayer
.src/main/java/com/bgsoftware/ssboneblock/actions/CommandAction.java
: Updated therun
method to acceptOfflinePlayer
instead ofPlayer
.src/main/java/com/bgsoftware/ssboneblock/actions/MultiAction.java
: Updated therun
method to acceptOfflinePlayer
instead ofPlayer
.src/main/java/com/bgsoftware/ssboneblock/actions/RandomAction.java
: Updated therun
method to acceptOfflinePlayer
instead ofPlayer
.src/main/java/com/bgsoftware/ssboneblock/actions/SetBlockAction.java
: Updated therun
method to acceptOfflinePlayer
instead ofPlayer
.src/main/java/com/bgsoftware/ssboneblock/actions/SpawnEntityAction.java
: Updated therun
method to acceptOfflinePlayer
instead ofPlayer
.Command Handling:
src/main/java/com/bgsoftware/ssboneblock/commands/commands/CmdSetPhase.java
: Changed thesetPhaseLevel
method to useasOfflinePlayer
for the island owner.src/main/java/com/bgsoftware/ssboneblock/commands/commands/CmdSetPhaseBlock.java
: Changed thesetPhaseBlock
method to useasOfflinePlayer
for the island owner.Phase Handling:
src/main/java/com/bgsoftware/ssboneblock/handler/PhasesHandler.java
: Updated various methods to useOfflinePlayer
instead ofPlayer
, includingrunNextAction
,runNextActionTimer
,setPhaseLevel
, andsetPhaseBlock
. [1] [2] [3]Event Handling:
src/main/java/com/bgsoftware/ssboneblock/listeners/IslandsListener.java
: Changed therunNextAction
call to useasOfflinePlayer
for the player.