Skip to content

Commit

Permalink
Prevent an error throw with UNKNOWN
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Nov 23, 2024
1 parent 1f822f2 commit 62c0d71
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ public void onPlayerPortalEvent(PlayerPortalEvent event)
{
case NETHER_PORTAL -> this.portalProcess(event, World.Environment.NETHER);
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
*/
}
}

Expand Down

0 comments on commit 62c0d71

Please sign in to comment.