Skip to content
Permalink
Browse files

Fix exit-deny-message using wrong region set on enderpearl/chorus-fruit.

  • Loading branch information...
wizjany committed Oct 6, 2019
1 parent e792dd6 commit 4c9812db04eab9a9fc96979772c0717d60fbf6f8
@@ -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);

0 comments on commit 4c9812d

Please sign in to comment.
You can’t perform that action at this time.