mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-14 22:56:18 +01:00
Fix exit-deny-message using wrong region set on enderpearl/chorus-fruit.
This commit is contained in:
parent
e792dd6f98
commit
4c9812db04
@ -379,7 +379,7 @@ public void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||
String message = null;
|
||||
if (!setFrom.testState(localPlayer, Flags.ENDERPEARL)) {
|
||||
cancel = true;
|
||||
message = set.queryValue(localPlayer, Flags.EXIT_DENY_MESSAGE);
|
||||
message = setFrom.queryValue(localPlayer, Flags.EXIT_DENY_MESSAGE);
|
||||
} else if (!set.testState(localPlayer, Flags.ENDERPEARL)) {
|
||||
cancel = true;
|
||||
message = set.queryValue(localPlayer, Flags.ENTRY_DENY_MESSAGE);
|
||||
@ -392,14 +392,13 @@ public void onPlayerTeleport(PlayerTeleportEvent event) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (event.getCause() == TeleportCause.CHORUS_FRUIT) {
|
||||
} else if (event.getCause() == TeleportCause.CHORUS_FRUIT) {
|
||||
if (!WorldGuard.getInstance().getPlatform().getSessionManager().hasBypass(localPlayer, localPlayer.getWorld())) {
|
||||
boolean cancel = false;
|
||||
String message = null;
|
||||
if (!setFrom.testState(localPlayer, Flags.CHORUS_TELEPORT)) {
|
||||
cancel = true;
|
||||
message = set.queryValue(localPlayer, Flags.EXIT_DENY_MESSAGE);
|
||||
message = setFrom.queryValue(localPlayer, Flags.EXIT_DENY_MESSAGE);
|
||||
} else if (!set.testState(localPlayer, Flags.CHORUS_TELEPORT)) {
|
||||
cancel = true;
|
||||
message = set.queryValue(localPlayer, Flags.ENTRY_DENY_MESSAGE);
|
||||
|
Loading…
Reference in New Issue
Block a user