mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-11 01:41:21 +01:00
Slight performance optimization to the movement checks to improve performance with slow permissions plugins
This commit is contained in:
parent
1581390092
commit
1a1acae588
@ -138,7 +138,12 @@ public static boolean checkMove(WorldGuardPlugin plugin, Player player, Location
|
||||
|
||||
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
||||
boolean hasBypass = plugin.getGlobalRegionManager().hasBypass(player, world);
|
||||
boolean hasRemoteBypass = plugin.getGlobalRegionManager().hasBypass(player, toWorld);
|
||||
boolean hasRemoteBypass;
|
||||
if (world.equals(toWorld)) {
|
||||
hasRemoteBypass = hasBypass;
|
||||
} else {
|
||||
hasRemoteBypass = plugin.getGlobalRegionManager().hasBypass(player, toWorld);
|
||||
}
|
||||
|
||||
RegionManager mgr = plugin.getGlobalRegionManager().get(toWorld);
|
||||
Vector pt = new Vector(to.getBlockX(), to.getBlockY(), to.getBlockZ());
|
||||
|
Loading…
Reference in New Issue
Block a user