Fix to avoid null colors

https://github.com/BentoBoxWorld/bentobox/issues/293
This commit is contained in:
tastybento 2018-10-05 17:19:51 -07:00
parent 818e60891f
commit 5039980693

View File

@ -361,8 +361,10 @@ public class Clipboard {
en.set("name", e.getCustomName()); en.set("name", e.getCustomName());
if (e instanceof Colorable) { if (e instanceof Colorable) {
Colorable c = (Colorable)e; Colorable c = (Colorable)e;
if (c.getColor() != null) {
en.set(COLOR, c.getColor().name()); en.set(COLOR, c.getColor().name());
} }
}
if (e instanceof Tameable && ((Tameable)e).isTamed()) { if (e instanceof Tameable && ((Tameable)e).isTamed()) {
en.set("tamed", true); en.set("tamed", true);
} }