#1353: Fix Structure#place not working as documented with 0 palette
This commit is contained in:
parent
3c1b778713
commit
20ac73ca28
@ -14,7 +14,7 @@
|
|||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
throw new IllegalStateException("No palettes");
|
throw new IllegalStateException("No palettes");
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ } else if (this.palette > 0) {
|
+ } else if (this.palette >= 0) {
|
||||||
+ if (this.palette >= i) {
|
+ if (this.palette >= i) {
|
||||||
+ throw new IllegalArgumentException("Palette index out of bounds. Got " + this.palette + " where there are only " + i + " palettes available.");
|
+ throw new IllegalArgumentException("Palette index out of bounds. Got " + this.palette + " where there are only " + i + " palettes available.");
|
||||||
+ }
|
+ }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user