diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java index dd7487e9..2e16a7fd 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java @@ -391,7 +391,9 @@ public class FaweBukkit implements IFawe, Listener { public void onPlayerQuit(PlayerQuitEvent event) { Player player = event.getPlayer(); FawePlayer fp = FawePlayer.wrap(player); - fp.unregister(); + if (fp != null) { + fp.unregister(); + } Fawe.get().unregister(event.getPlayer().getName()); } diff --git a/forge110/src/main/java/com/boydti/fawe/forge/ForgeMain.java b/forge110/src/main/java/com/boydti/fawe/forge/ForgeMain.java index 672a75e0..493665e0 100644 --- a/forge110/src/main/java/com/boydti/fawe/forge/ForgeMain.java +++ b/forge110/src/main/java/com/boydti/fawe/forge/ForgeMain.java @@ -54,7 +54,9 @@ public class ForgeMain { public void handleQuit(EntityPlayerMP player) { FawePlayer fp = FawePlayer.wrap(player); - fp.unregister(); + if (fp != null) { + fp.unregister(); + } Fawe.get().unregister(player.getName()); } diff --git a/forge111/src/main/java/com/boydti/fawe/forge/ForgeMain.java b/forge111/src/main/java/com/boydti/fawe/forge/ForgeMain.java index c35b6d8c..abc2411a 100644 --- a/forge111/src/main/java/com/boydti/fawe/forge/ForgeMain.java +++ b/forge111/src/main/java/com/boydti/fawe/forge/ForgeMain.java @@ -53,7 +53,9 @@ public class ForgeMain { public void handleQuit(EntityPlayerMP player) { FawePlayer fp = FawePlayer.wrap(player); - fp.unregister(); + if (fp != null) { + fp.unregister(); + } Fawe.get().unregister(player.getName()); } diff --git a/forge1710/src/main/java/com/boydti/fawe/forge/ForgeMain.java b/forge1710/src/main/java/com/boydti/fawe/forge/ForgeMain.java index a7c56424..55039179 100644 --- a/forge1710/src/main/java/com/boydti/fawe/forge/ForgeMain.java +++ b/forge1710/src/main/java/com/boydti/fawe/forge/ForgeMain.java @@ -55,7 +55,9 @@ public class ForgeMain { public void handleQuit(EntityPlayerMP player) { FawePlayer fp = FawePlayer.wrap(player); - fp.unregister(); + if (fp != null) { + fp.unregister(); + } Fawe.get().unregister(player.getCommandSenderName()); } diff --git a/forge189/src/main/java/com/boydti/fawe/forge/ForgeMain.java b/forge189/src/main/java/com/boydti/fawe/forge/ForgeMain.java index 21cfd85f..f13a33d4 100644 --- a/forge189/src/main/java/com/boydti/fawe/forge/ForgeMain.java +++ b/forge189/src/main/java/com/boydti/fawe/forge/ForgeMain.java @@ -55,7 +55,9 @@ public class ForgeMain { public void handleQuit(EntityPlayerMP player) { FawePlayer fp = FawePlayer.wrap(player); - fp.unregister(); + if (fp != null) { + fp.unregister(); + } Fawe.get().unregister(player.getName()); } diff --git a/forge194/src/main/java/com/boydti/fawe/forge/ForgeMain.java b/forge194/src/main/java/com/boydti/fawe/forge/ForgeMain.java index 672a75e0..493665e0 100644 --- a/forge194/src/main/java/com/boydti/fawe/forge/ForgeMain.java +++ b/forge194/src/main/java/com/boydti/fawe/forge/ForgeMain.java @@ -54,7 +54,9 @@ public class ForgeMain { public void handleQuit(EntityPlayerMP player) { FawePlayer fp = FawePlayer.wrap(player); - fp.unregister(); + if (fp != null) { + fp.unregister(); + } Fawe.get().unregister(player.getName()); } diff --git a/nukkit/src/main/java/com/boydti/fawe/nukkit/optimization/FaweNukkit.java b/nukkit/src/main/java/com/boydti/fawe/nukkit/optimization/FaweNukkit.java index 7697705d..58d6def2 100644 --- a/nukkit/src/main/java/com/boydti/fawe/nukkit/optimization/FaweNukkit.java +++ b/nukkit/src/main/java/com/boydti/fawe/nukkit/optimization/FaweNukkit.java @@ -37,7 +37,9 @@ public class FaweNukkit implements IFawe, Listener { public void onPlayerQuit(PlayerQuitEvent event) { Player player = event.getPlayer(); FawePlayer fp = FawePlayer.wrap(player); - fp.unregister(); + if (fp != null) { + fp.unregister(); + } Fawe.get().unregister(event.getPlayer().getName()); }