JK I found some more
This commit is contained in:
parent
f1e48ff90c
commit
1944b2ecc9
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,11 @@ public abstract class GameSummaryComponent<T>
|
||||
public boolean sendMessage(Player player)
|
||||
{
|
||||
T result = _getFunction.apply(player);
|
||||
if (result == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
String mainText = getMainText(result);
|
||||
List<String> hoverText = getHoverText(result);
|
||||
|
||||
|
@ -23,7 +23,7 @@ public class LevelUpSummaryComponent extends ExperienceSummaryComponent
|
||||
@Override
|
||||
public String getMainText(Pair<AchievementLog, AchievementData> data)
|
||||
{
|
||||
if (!data.getLeft().LevelUp)
|
||||
if (data.getLeft() == null || !data.getLeft().LevelUp)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -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;
|
||||
@ -141,6 +142,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)
|
||||
{
|
||||
return;
|
||||
|
@ -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<Game>
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user