diff --git a/src/main/java/me/youhavetrouble/preventstabby/listeners/toggles/CombatCommandListener.java b/src/main/java/me/youhavetrouble/preventstabby/listeners/toggles/CombatCommandListener.java index 238be22..01822de 100644 --- a/src/main/java/me/youhavetrouble/preventstabby/listeners/toggles/CombatCommandListener.java +++ b/src/main/java/me/youhavetrouble/preventstabby/listeners/toggles/CombatCommandListener.java @@ -17,6 +17,9 @@ public void onPlayerCommandInCombat(org.bukkit.event.player.PlayerCommandPreproc if (!PreventStabby.getPlugin().getConfigCache().isBlock_commands_in_combat()) return; + if (event.getPlayer().hasPermission("toglepvp.combatcommandblock.bypass")) + return; + PlayerManager playerManager = PreventStabby.getPlugin().getPlayerManager(); if (!playerManager.getPlayer(event.getPlayer().getUniqueId()).isInCombat()) @@ -27,9 +30,6 @@ public void onPlayerCommandInCombat(org.bukkit.event.player.PlayerCommandPreproc if (!PreventStabby.getPlugin().getConfigCache().getCombatBlockedCommands().contains(command)) return; - if (event.getPlayer().hasPermission("toglepvp.combatcommandblock.bypass")) - return; - event.setCancelled(true); PluginMessages.sendMessage(event.getPlayer(), PreventStabby.getPlugin().getConfigCache().getCant_do_that_during_combat());