mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-23 01:27:40 +01:00
Small performance improvement for PlayerDomain#contains()
(#1765)
* Improve performance by putting UUID checks first. * Added wizjany's suggestion Co-authored-by: wizjany <wizjany@gmail.com>
This commit is contained in:
parent
09ce3b6373
commit
7dcec2b3b4
@ -149,7 +149,7 @@ public void removePlayer(LocalPlayer player) {
|
||||
@Override
|
||||
public boolean contains(LocalPlayer player) {
|
||||
checkNotNull(player);
|
||||
return contains(player.getName().trim().toLowerCase()) || contains(player.getUniqueId());
|
||||
return contains(player.getUniqueId()) || (!names.isEmpty() && contains(player.getName()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user