mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-07 04:48:07 +02:00
Fix for bug #728. Multiverse + WorldGuard region exit flag.
This commit is contained in:
parent
16da53ae4e
commit
2eea5c7bf7
@ -283,8 +283,9 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
if (event.getFrom().getBlockX() != event.getTo().getBlockX()
|
if (event.getFrom().getBlockX() != event.getTo().getBlockX()
|
||||||
|| event.getFrom().getBlockY() != event.getTo().getBlockY()
|
|| event.getFrom().getBlockY() != event.getTo().getBlockY()
|
||||||
|| event.getFrom().getBlockZ() != event.getTo().getBlockZ()) {
|
|| event.getFrom().getBlockZ() != event.getTo().getBlockZ()) {
|
||||||
|
|
||||||
PlayerFlagState state = plugin.getFlagStateManager().getState(player);
|
PlayerFlagState state = plugin.getFlagStateManager().getState(player);
|
||||||
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
LocalPlayer localPlayer = plugin.wrapPlayer(player);
|
||||||
boolean hasBypass = plugin.getGlobalRegionManager().hasBypass(player, world);
|
boolean hasBypass = plugin.getGlobalRegionManager().hasBypass(player, world);
|
||||||
|
|
||||||
RegionManager mgr = plugin.getGlobalRegionManager().get(world);
|
RegionManager mgr = plugin.getGlobalRegionManager().get(world);
|
||||||
@ -303,6 +304,12 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Fix for bug #728
|
||||||
|
if (state.lastWorld != null && !state.lastWorld.equals(world)) {
|
||||||
|
plugin.getFlagStateManager().forget(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Have to set this state
|
// Have to set this state
|
||||||
if (state.lastExitAllowed == null) {
|
if (state.lastExitAllowed == null) {
|
||||||
state.lastExitAllowed = mgr.getApplicableRegions(toVector(event.getFrom()))
|
state.lastExitAllowed = mgr.getApplicableRegions(toVector(event.getFrom()))
|
||||||
|
Loading…
Reference in New Issue
Block a user