andune / HomeSpawnPlus

Home/Spawn control plugin for Bukkit
GNU General Public License v3.0
13 stars 10 forks source link

modeRequiresBed not working (could not pass PlayerRespawnEvent) #120

Open afroman84 opened 7 years ago

afroman84 commented 7 years ago

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 1) looks for a setted bed 2) if no bed, respawns at the player's first login spawn onDeath:

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: https://github.com/andune/HomeSpawnPlus/issues/107

JohOply commented 6 years ago

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

JohOply commented 6 years ago

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?