Use deny-message for nether portal protection.

Closes #1882.
This commit is contained in:
wizjany 2022-02-26 18:49:35 -05:00
parent e05d42371f
commit 660f9ffa0d
No known key found for this signature in database
GPG Key ID: 1DB5861C03B76B5E

View File

@ -684,7 +684,8 @@ public void onCreatePortal(PortalCreateEvent event) {
if (associable != null) {
// NB there is no way to cancel the teleport without PTA (since PlayerPortal doesn't have block info)
// removing PTA was a mistake
associable.print("Destination is an a protected area.");
String message = regions.queryValue(associable, Flags.DENY_MESSAGE);
RegionProtectionListener.formatAndSendDenyMessage("create portals", associable, message);
}
event.setCancelled(true);
}