mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-31 22:30:15 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -819,7 +819,7 @@ public abstract class PlayerList {
|
||||||
this.operators.add(s.toLowerCase());
|
this.operators.add(s.toLowerCase());
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Player player = server.server.getPlayer(s);
|
Player player = server.server.getPlayerExact(s);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
player.recalculatePermissions();
|
player.recalculatePermissions();
|
||||||
}
|
}
|
||||||
|
@ -830,7 +830,7 @@ public abstract class PlayerList {
|
||||||
this.operators.remove(s.toLowerCase());
|
this.operators.remove(s.toLowerCase());
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Player player = server.server.getPlayer(s);
|
Player player = server.server.getPlayerExact(s);
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
player.recalculatePermissions();
|
player.recalculatePermissions();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue