Fixed not being able to exit spell casting when sneaking despite setting spell cast to sneak-F

This commit is contained in:
ASangarin 2020-12-20 23:17:08 +01:00
parent 56257c442d
commit decc75a5b0

View File

@ -102,7 +102,7 @@ public class SpellCast implements Listener {
? MMOCore.plugin.configManager.sneakingSwapAction
: MMOCore.plugin.configManager.normalSwapAction;
if(action != ConfigManager.SwapAction.SPELL_CAST || !playerData.isOnline()) return;
if (event.getPlayer().equals(playerData.getPlayer()) && !player.isSneaking()) {
if (event.getPlayer().equals(playerData.getPlayer())) {
MMOCore.plugin.soundManager.play(player, SoundManager.SoundEvent.SPELL_CAST_END);
MMOCore.plugin.configManager.getSimpleMessage("casting.no-longer").send(playerData.getPlayer());
close();