Skip to content

Commit 5039980

Browse files
committed
Fix to avoid null colors
#293
1 parent 818e608 commit 5039980

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/world/bentobox/bentobox/schems/Clipboard.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ private boolean copyBlock(Block block, Location copyOrigin, boolean copyAir, Col
361361
en.set("name", e.getCustomName());
362362
if (e instanceof Colorable) {
363363
Colorable c = (Colorable)e;
364-
en.set(COLOR, c.getColor().name());
364+
if (c.getColor() != null) {
365+
en.set(COLOR, c.getColor().name());
366+
}
365367
}
366368
if (e instanceof Tameable && ((Tameable)e).isTamed()) {
367369
en.set("tamed", true);

0 commit comments

Comments
 (0)