From db691ff5c8894296f1ab94c58bba330ee481ceb5 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Fri, 2 Sep 2011 21:30:16 +0100 Subject: [PATCH] Fixed player.setOp not deopping players --- .../java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index c86d7e5c99..01cf763f24 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -40,7 +40,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setOp(boolean value) { - server.getHandle().e(getName()); + if (value == isOp()) return; + + if (value) { + server.getHandle().e(getName()); + } else { + server.getHandle().f(getName()); + } } public boolean isPlayer() {