Fix announcement NPE

This commit is contained in:
Goh Wei Wen 2020-06-15 00:10:42 +08:00
parent b45fd2101c
commit d5a6d318e5

View File

@ -76,6 +76,8 @@ public class AnnouncerStartGameTask extends BukkitRunnable {
continue;
}
dGroup.setDungeon(announcer.getDungeonName() == null ? announcer.getMapName() : announcer.getDungeonName());
if (game == null) {
ResourceWorld resource = plugin.getMapRegistry().get(announcer.getMapName());
if (resource == null) {
@ -94,7 +96,6 @@ public class AnnouncerStartGameTask extends BukkitRunnable {
game.addGroup(dGroup);
}
dGroup.setDungeon(announcer.getDungeonName() == null ? announcer.getMapName() : announcer.getDungeonName());
dGroup.setGameWorld(game.getWorld());
}