File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/me/eccentric_nz/TARDIS/planets Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,9 @@ public void setTrades(Merchant villager) {
5454 }
5555
5656 public MerchantRecipe getRoom () {
57- // room blueprint index 0 and 1 are not rooms, and the last index is the zero room which can't be grown with ARS
58- BlueprintRoom bpr = BlueprintRoom .values ()[TARDISConstants .RANDOM .nextInt (2 , BlueprintRoom .values ().length - 1 )];
57+ // room blueprint index 0 is not a room, and the last index is the zero room which is a special case (requires config option)
58+ int index = plugin .getConfig ().getBoolean ("allow.zero_room" ) ? 0 : 1 ;
59+ BlueprintRoom bpr = BlueprintRoom .values ()[TARDISConstants .RANDOM .nextInt (2 , BlueprintRoom .values ().length - index )];
5960 // get the blueprint item stack
6061 ItemStack ris = buildResult (bpr .getPermission (), bpr .toString ());
6162 // single use?
You can’t perform that action at this time.
0 commit comments