diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/TreasureAnimation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/TreasureAnimation.java index 489ee40eb..d0043eaa4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/TreasureAnimation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/animation/TreasureAnimation.java @@ -180,7 +180,8 @@ public abstract class TreasureAnimation implements Runnable { onFinish(); TreasureSession session = _treasureLocation.getSession(); - UtilServer.CallEvent(new TreasureAnimationFinishEvent(session.getPlayer(), session, this)); + if (session != null) + UtilServer.CallEvent(new TreasureAnimationFinishEvent(session.getPlayer(), session, this)); } } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/gamesummary/GameSummaryComponent.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/gamesummary/GameSummaryComponent.java index 31b4810d4..076e27c05 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/gamesummary/GameSummaryComponent.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/gamesummary/GameSummaryComponent.java @@ -29,6 +29,11 @@ public abstract class GameSummaryComponent public boolean sendMessage(Player player) { T result = _getFunction.apply(player); + if (result == null) + { + return false; + } + String mainText = getMainText(result); List hoverText = getHoverText(result); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/gamesummary/components/LevelUpSummaryComponent.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/gamesummary/components/LevelUpSummaryComponent.java index 3ddfb43b8..23bacd981 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/gamesummary/components/LevelUpSummaryComponent.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/modules/gamesummary/components/LevelUpSummaryComponent.java @@ -23,7 +23,7 @@ public class LevelUpSummaryComponent extends ExperienceSummaryComponent @Override public String getMainText(Pair data) { - if (!data.getLeft().LevelUp) + if (data.getLeft() == null || !data.getLeft().LevelUp) { return null; } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFletcher.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFletcher.java index ee99aa27a..8c2245cba 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFletcher.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkFletcher.java @@ -3,6 +3,7 @@ package nautilus.game.arcade.kit.perks; import java.util.HashSet; import java.util.Iterator; +import mineplex.core.Managers; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilGear; import mineplex.core.common.util.UtilInv; @@ -140,6 +141,9 @@ public class PerkFletcher extends Perk { if (event.getType() != UpdateType.FAST) return; + + if (Manager.GetGame() == null) + return; if (!UtilTime.elapsed(Manager.GetGame().getGameLiveTime(), _time * 1000) && !_instant) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/quest/WinQuestTracker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/quest/WinQuestTracker.java index 5f6ed32c3..bb591ae23 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/quest/WinQuestTracker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/quest/WinQuestTracker.java @@ -12,6 +12,7 @@ import nautilus.game.arcade.Arcade; import nautilus.game.arcade.events.GameStateChangeEvent; import nautilus.game.arcade.game.Game; import nautilus.game.arcade.game.Game.GameState; +import nautilus.game.arcade.kit.Kit; /** * WinQuestTracker @@ -41,7 +42,13 @@ public class WinQuestTracker extends QuestTracker for (Player player : winners) { - incrementQuests(player, 1, ((Arcade) UtilServer.getPlugin()).getServerConfig().getServerGroup().getPrefix(), getGame().GetKit(player).GetName() + "Kit"); + Kit kit = getGame().GetKit(player); + if (kit != null) + { + incrementQuests(player, 1, + ((Arcade) UtilServer.getPlugin()).getServerConfig().getServerGroup().getPrefix(), + kit.GetName() + "Kit"); + } } } diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/quest/types/KillPlayerQuest.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/quest/types/KillPlayerQuest.java index e36ea03e6..b978e4b0c 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/quest/types/KillPlayerQuest.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/quest/types/KillPlayerQuest.java @@ -46,7 +46,7 @@ public class KillPlayerQuest extends Quest { Player player = event.getPlayer(); - if (!isActive(player) || !event.getReason().startsWith("Killing")) + if (!isActive(player) || event.getReason() == null || !event.getReason().startsWith("Killing")) { return; }