mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-27 14:34:57 +01: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());
|
||||
|
||||
// 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…
Add table
Reference in a new issue