Merge pull request #1030 from goweiwen/fix-multifloor-dungeon-npe

Properly initialize dungeon in DGame constructor
This commit is contained in:
Daniel Saukel 2021-06-08 16:52:42 +02:00 committed by GitHub
commit a767254645
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,8 @@ public class DGame implements Game {
this.plugin = plugin; this.plugin = plugin;
plugin.getGameCache().add(this); plugin.getGameCache().add(this);
this.dungeon = dungeon; setDungeon(dungeon);
if (this.dungeon == null) { if (this.dungeon == null) {
throw new IllegalStateException("Game initialized without dungeon"); throw new IllegalStateException("Game initialized without dungeon");
} }