From 7a0b399f401983875e6b79dd0605437d3d3b4dcd Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Fri, 2 Sep 2011 21:30:16 +0100 Subject: [PATCH] Fixed player.setOp not deopping players By: Dinnerbone --- .../java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index c86d7e5c99..01cf763f24 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/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() {