mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-19 15:48:10 +01:00
Merge pull request #190 from skeight/master
Fix for bug #728 (Multiverse + Worldguard region with exit flag set)
This commit is contained in:
commit
47c84beb43
@ -303,6 +303,12 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Flush states in multiworld scenario
|
||||||
|
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()))
|
||||||
@ -325,7 +331,7 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
String farewell = set.getFlag(DefaultFlag.FAREWELL_MESSAGE);
|
String farewell = set.getFlag(DefaultFlag.FAREWELL_MESSAGE);
|
||||||
Boolean notifyEnter = set.getFlag(DefaultFlag.NOTIFY_ENTER);
|
Boolean notifyEnter = set.getFlag(DefaultFlag.NOTIFY_ENTER);
|
||||||
Boolean notifyLeave = set.getFlag(DefaultFlag.NOTIFY_LEAVE);
|
Boolean notifyLeave = set.getFlag(DefaultFlag.NOTIFY_LEAVE);
|
||||||
|
|
||||||
if (state.lastFarewell != null && (farewell == null
|
if (state.lastFarewell != null && (farewell == null
|
||||||
|| !state.lastFarewell.equals(farewell))) {
|
|| !state.lastFarewell.equals(farewell))) {
|
||||||
String replacedFarewell = plugin.replaceMacros(
|
String replacedFarewell = plugin.replaceMacros(
|
||||||
|
Loading…
Reference in New Issue
Block a user