Fix an NPE with quest tracking when using /game stop
This commit is contained in:
parent
098afc2bf4
commit
1c5bbda8cd
@ -1,5 +1,7 @@
|
|||||||
package nautilus.game.arcade.quest;
|
package nautilus.game.arcade.quest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
|
||||||
@ -30,7 +32,14 @@ public class WinQuestTracker extends QuestTracker<Game>
|
|||||||
if (event.GetState() != GameState.End)
|
if (event.GetState() != GameState.End)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (Player player : getGame().getWinners())
|
List<Player> winners = getGame().getWinners();
|
||||||
|
|
||||||
|
if (winners == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Player player : winners)
|
||||||
{
|
{
|
||||||
incrementQuests(player, 1, ((Arcade) UtilServer.getPlugin()).getServerConfig().getServerGroup().getPrefix(), getGame().GetKit(player).GetName() + "Kit");
|
incrementQuests(player, 1, ((Arcade) UtilServer.getPlugin()).getServerConfig().getServerGroup().getPrefix(), getGame().GetKit(player).GetName() + "Kit");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user