From 9969a86e839560f6fe4cfbfefa1c5d4f47df0a54 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 2 Dec 2013 20:09:22 -0500 Subject: [PATCH] Use strict lookup for op permission refresh. Fixes BUKKIT-4698 Adding or removing operators was mistakenly using a loose player lookup method, which would cause a permission refreshes on an online player whos name starts with the name of the (offline) opped player. Add/Remove op operations are exact name match only and the permission refresh will behave the same way. --- src/main/java/net/minecraft/server/PlayerList.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java index 92e5c89398..534073b3ff 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -819,7 +819,7 @@ public abstract class PlayerList { this.operators.add(s.toLowerCase()); // CraftBukkit start - Player player = server.server.getPlayer(s); + Player player = server.server.getPlayerExact(s); if (player != null) { player.recalculatePermissions(); } @@ -830,7 +830,7 @@ public abstract class PlayerList { this.operators.remove(s.toLowerCase()); // CraftBukkit start - Player player = server.server.getPlayer(s); + Player player = server.server.getPlayerExact(s); if (player != null) { player.recalculatePermissions(); }