Skip to content

Commit fe6cd3b

Browse files
committed
Load some default values when the pushdata builder is null
1 parent 4423e77 commit fe6cd3b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

setup/src/main/java/net/theevilreaper/bounce/setup/builder/GameMapBuilder.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,17 @@ public GameMapBuilder(@NotNull GameMap gameMap) {
3737
}
3838
this.spawn = gameMap.getSpawn();
3939
this.gameSpawn = gameMap.getGameSpawn();
40-
this.pushDataBuilder = PushData.builder(gameMap.getPushData());
40+
41+
if (gameMap.getPushData() == null) {
42+
this.pushDataBuilder = PushData.builder();
43+
this.pushDataBuilder
44+
.add(PushEntry.groundEntry(Block.GLASS, 1))
45+
.add(PushEntry.pushEntry(Block.GOLD_BLOCK, 1))
46+
.add(PushEntry.pushEntry(Block.DIAMOND_BLOCK, 1))
47+
.add(PushEntry.pushEntry(Block.EMERALD_BLOCK, 1));
48+
} else{
49+
this.pushDataBuilder = PushData.builder(gameMap.getPushData());
50+
}
4151
}
4252

4353
/**

0 commit comments

Comments
 (0)