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.
This commit is contained in:
parent
c5d8b4393a
commit
9969a86e83
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user