From 2a2d9d39240a0d07a24487f4b19664b20a918564 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 30 Jul 2024 22:48:01 -0700 Subject: [PATCH] Add defensive code for null to's #131 --- .../java/world/bentobox/border/listeners/PlayerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/border/listeners/PlayerListener.java b/src/main/java/world/bentobox/border/listeners/PlayerListener.java index 547027f..7a4093f 100644 --- a/src/main/java/world/bentobox/border/listeners/PlayerListener.java +++ b/src/main/java/world/bentobox/border/listeners/PlayerListener.java @@ -110,7 +110,7 @@ public void onPlayerTeleport(PlayerTeleportEvent e) { show.clearUser(User.getInstance(player)); - if (!addon.inGameWorld(to.getWorld())) { + if (to == null || !addon.inGameWorld(to.getWorld())) { return; }