From 3c80c7635ffec8db79f8127542352e6a34523161 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 10 Jan 2016 16:48:18 +0100 Subject: [PATCH] Fix NPE in /dxl list --- src/io/github/dre2n/dungeonsxl/command/ListCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/io/github/dre2n/dungeonsxl/command/ListCommand.java b/src/io/github/dre2n/dungeonsxl/command/ListCommand.java index a1e1cc57..d1fa43f5 100644 --- a/src/io/github/dre2n/dungeonsxl/command/ListCommand.java +++ b/src/io/github/dre2n/dungeonsxl/command/ListCommand.java @@ -107,7 +107,11 @@ public class ListCommand extends DCommand { for (String map : toSend) { WorldConfig worldConfig = new WorldConfig(new File(mapFolder + "/" + map, "config.yml")); - MessageUtil.sendMessage(sender, "&b" + map + "&7 | &e" + worldConfig.getInvitedPlayers().contains(sender)); + boolean invited = false; + if (worldConfig != null) { + invited = worldConfig.getInvitedPlayers().contains(sender); + } + MessageUtil.sendMessage(sender, "&b" + map + "&7 | &e" + invited); } } else if (listType == 1) {