mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 05:05:18 +01:00
Do a null check
This commit is contained in:
parent
2ffa4c9874
commit
081f74544b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user