Prevent an error throw with UNKNOWN

Relates to https://github.com/BentoBoxWorld/Boxed/issues/101
This commit is contained in:
tastybento 2024-11-22 17:54:17 -08:00
parent 1f822f2fea
commit 62c0d71e14

View File

@ -78,7 +78,13 @@ public class PlayerTeleportListener extends AbstractTeleportListener implements
{ {
case NETHER_PORTAL -> this.portalProcess(event, World.Environment.NETHER); case NETHER_PORTAL -> this.portalProcess(event, World.Environment.NETHER);
case END_PORTAL, END_GATEWAY -> this.portalProcess(event, World.Environment.THE_END); case END_PORTAL, END_GATEWAY -> this.portalProcess(event, World.Environment.THE_END);
default -> throw new IllegalArgumentException("Unexpected value: " + event.getCause()); default -> { // Do nothing, ignore
}
/*
* Other potential reasons: CHORUS_FRUIT , COMMAND, DISMOUNT,
* ENDER_PEARL, EXIT_BED, PLUGIN, SPECTATE , UNKNOWN
*/
} }
} }