Do a null check

This commit is contained in:
tastybento 2021-10-11 17:48:41 -07:00
parent 2ffa4c9874
commit 081f74544b

View File

@ -155,7 +155,7 @@ public class PortalTeleportationListener implements Listener {
private boolean processPortal(final PlayerEntityPortalEvent e, final Environment env) {
World fromWorld = e.getFrom().getWorld();
World overWorld = Util.getWorld(fromWorld);
if (fromWorld == null || !plugin.getIWM().inWorld(overWorld)) {
if (overWorld == null || fromWorld == null || !plugin.getIWM().inWorld(overWorld)) {
// Do nothing special
return false;
}