diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-02 21:30:16 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-02 21:30:16 +0100 |
commit | db691ff5c8894296f1ab94c58bba330ee481ceb5 (patch) | |
tree | e41ee1272b802492ce73a608ffabf045dc99a8ab | |
parent | 7c491b7bc7344da33c47b23088de2b2a3d0a67ca (diff) | |
download | craftbukkit-db691ff5c8894296f1ab94c58bba330ee481ceb5.tar craftbukkit-db691ff5c8894296f1ab94c58bba330ee481ceb5.tar.gz craftbukkit-db691ff5c8894296f1ab94c58bba330ee481ceb5.tar.lz craftbukkit-db691ff5c8894296f1ab94c58bba330ee481ceb5.tar.xz craftbukkit-db691ff5c8894296f1ab94c58bba330ee481ceb5.zip |
Fixed player.setOp not deopping players
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index c86d7e5c..01cf763f 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() { |