From c490a3d62ee82e14f7abd9680b3077635d78f6bf Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 14 Aug 2014 22:37:20 +0100 Subject: [PATCH] Now made qdeop require you to be op else it wont try to deop the player. --- .../TotalFreedomMod/Commands/Command_qdeop.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qdeop.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qdeop.java index 4a24e8f..9e7452b 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qdeop.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qdeop.java @@ -34,9 +34,12 @@ public class Command_qdeop extends TFM_Command { if (player.getName().toLowerCase().contains(targetName) || player.getDisplayName().toLowerCase().contains(targetName)) { - matchedPlayerNames.add(player.getName()); - player.setOp(false); - player.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP); + if (player.isOp()) + { + matchedPlayerNames.add(player.getName()); + player.setOp(false); + player.sendMessage(TotalFreedomMod.YOU_ARE_NOT_OP); + } } }