mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-05 18:40:06 +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) {
|
private boolean processPortal(final PlayerEntityPortalEvent e, final Environment env) {
|
||||||
World fromWorld = e.getFrom().getWorld();
|
World fromWorld = e.getFrom().getWorld();
|
||||||
World overWorld = Util.getWorld(fromWorld);
|
World overWorld = Util.getWorld(fromWorld);
|
||||||
if (fromWorld == null || !plugin.getIWM().inWorld(overWorld)) {
|
if (overWorld == null || fromWorld == null || !plugin.getIWM().inWorld(overWorld)) {
|
||||||
// Do nothing special
|
// Do nothing special
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user