Change priority of PlayerPortalEvent in PortalTeleportationListener

https://github.com/BentoBoxWorld/BentoBox/issues/1101
This commit is contained in:
tastybento 2020-02-07 14:07:12 -08:00
parent 898e310e4f
commit d972dd10c1

View File

@ -55,7 +55,7 @@ public class PortalTeleportationListener implements Listener {
* Handles end portals * Handles end portals
* @param e - event * @param e - event
*/ */
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public boolean onEndIslandPortal(PlayerPortalEvent e) { public boolean onEndIslandPortal(PlayerPortalEvent e) {
if (e.getCause() != TeleportCause.END_PORTAL) { if (e.getCause() != TeleportCause.END_PORTAL) {
return false; return false;
@ -142,10 +142,10 @@ public class PortalTeleportationListener implements Listener {
} }
/** /**
* Handles nether portals * Handles nether portals.
* @param e - event * @param e - event
*/ */
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) // Use HIGH to allow Multiverse first shot
public boolean onNetherPortal(PlayerPortalEvent e) { public boolean onNetherPortal(PlayerPortalEvent e) {
if (e.getCause() != TeleportCause.NETHER_PORTAL) { if (e.getCause() != TeleportCause.NETHER_PORTAL) {
return false; return false;