modeRequiresBed not working (could not pass PlayerRespawnEvent)
afroman84 opened this issue ยท 2 comments
Hello, i'm using latest 642 build of HSP, unfortunately the modeRequiresBed is not working and make not work all the strategy: https://hastebin.com/capiciweqa.vbs
Also when a player join i get this error: https://hastebin.com/kekaniyedo.vbs
the "could not pass event" error breaks the strategy, making the plugin unuseful.
this is the strategy i set:
strategies to use when player is respawning after a death
- looks for a setted bed
- if no bed, respawns at the player's first login spawn
onDeath:
- modeRequiresBed
- homeMultiWorld
- spawnLocalPlayerSpawn
- modeRememberSpawn
- spawnLocalRandom
- modeDefault
- default
if i comment modeRequiresBed the strategy works, but i need the bed to be there when players try to respawn.
Thank you for the attention, i hope this issue get some attention because is since 1.10.2 that happens: #107
Hello @andune
I have the same bug, so I can't test if bed still exist (MC Spigot 1.12.2, HSP b642).
https://pastebin.com/4Awd4mH0
I still hope this bug will be fixed someday, thank you for your work on this plugin :)
Cheers
I am not a dev so I don't know if it is really what i will speak about.
I have an hypothesis: in https://github.com/andune/HomeSpawnPlus/blob/master/core/src/main/java/com/andune/minecraft/hsp/strategies/mode/ModeHomeRequiresBed.java#L44 , @OverRide are reverse in comparison to most of others strategies :
@Override
public String getStrategyConfigName() {
return "modeRequiresBed";
}
@Override
public StrategyMode getMode() {
return StrategyMode.MODE_HOME_REQUIRES_BED;
}
Instead of:
@Override
public StrategyMode getMode() {
return StrategyMode.MODE_HOME_REQUIRES_BED;
}
@Override
public String getStrategyConfigName() {
return "modeRequiresBed";
}
Like here https://github.com/andune/HomeSpawnPlus/blob/master/core/src/main/java/com/andune/minecraft/hsp/strategies/mode/ModeHomeBedOnly.java or here https://github.com/andune/HomeSpawnPlus/blob/master/core/src/main/java/com/andune/minecraft/hsp/strategies/mode/ModeHomeNormal.java for instance
Is it this little mistake, maybe?