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,7 +361,9 @@ public class Clipboard {
en.set("name", e.getCustomName());
if (e instanceof Colorable) {
Colorable c = (Colorable)e;
en.set(COLOR, c.getColor().name());
if (c.getColor() != null) {
en.set(COLOR, c.getColor().name());
}
}
if (e instanceof Tameable && ((Tameable)e).isTamed()) {
en.set("tamed", true);