diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventModule.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventModule.java index b38a8f6af..31508193d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventModule.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/event/EventModule.java @@ -211,7 +211,7 @@ public class EventModule extends MiniPlugin @EventHandler(priority = EventPriority.LOWEST) public void commandHandler(PlayerCommandPreprocessEvent event) { - if (!Manager.GetGame().InProgress()) + if (Manager.GetGame() == null || !Manager.GetGame().InProgress()) return; if (!event.getMessage().toLowerCase().startsWith("/e ")) @@ -1837,7 +1837,7 @@ public class EventModule extends MiniPlugin @EventHandler public void StackEntity(PlayerInteractEntityEvent event) { - if (!Manager.GetGame().IsLive()) + if (Manager.GetGame() == null || !Manager.GetGame().IsLive()) return; if (event.getRightClicked().getVehicle() != null) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/data/TNTGenerator.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/data/TNTGenerator.java index e13c98f0f..ebff5b18f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/data/TNTGenerator.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/skywars/data/TNTGenerator.java @@ -79,10 +79,7 @@ public class TNTGenerator public void pickup(Player player, Item item) { if (_ent == null) - { - _ent.remove(); return; - } if (!_ent.equals(item)) return; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkMadScientist.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkMadScientist.java index e25e1b16b..2edeb706a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkMadScientist.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkMadScientist.java @@ -148,6 +148,8 @@ public class PerkMadScientist extends Perk implements IThrown } Zombie zombie = (Zombie) e.getEntity(); + if (zombie.getCustomName() == null) + return; Player targetPlayer = (Player) e.getTarget(); String name = ChatColor diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java index 500dcd7c0..1923c030f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java @@ -123,7 +123,8 @@ public class MiscManager implements Listener return; // Prevent players from hub warping off clock in Master Builders - if (!player.getItemInHand().getItemMeta().getDisplayName().contains("Hub")) + String displayName = player.getItemInHand().getItemMeta().getDisplayName(); + if (displayName == null || !displayName.contains("Hub")) return; if (!Recharge.Instance.usable(event.getPlayer(), "Return to Hub")) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/chat/GameChatManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/chat/GameChatManager.java index 17790177e..0d9dea0fa 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/chat/GameChatManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/chat/GameChatManager.java @@ -60,7 +60,7 @@ public class GameChatManager implements Listener @EventHandler public void HandleChat(AsyncPlayerChatEvent event) { - if (event.isCancelled()) + if (event.isCancelled() || event.getMessage().isEmpty()) return; Player sender = event.getPlayer(); @@ -166,7 +166,7 @@ public class GameChatManager implements Listener else message = event.getFormat().split(sender.getName())[1].replace("%2$s", "") + _manager.GetChat().getFilteredMessage(sender, event.getMessage()); - if (_manager.GetGame().GetState() != GameState.Live) + if (_manager.GetGame() == null || _manager.GetGame().GetState() != GameState.Live) { event.setFormat(levelStr + rankStr + senderName + " " + C.cWhite + "%2$s");