diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/BlackList.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/BlackList.java index 6bd5aef..d85067a 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/BlackList.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/BlackList.java @@ -74,7 +74,8 @@ public class BlackList extends ArrayList implements Confi add((Blacklisted) el); } else { try { - add(el.toString()); + if (el != null) + add(el.toString()); } catch (InvalidValueException e) { System.err.println(e.getCause().getMessage()); } diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/BlackListEntity.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/BlackListEntity.java index 40e33e8..3d3b68f 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/BlackListEntity.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/BlackListEntity.java @@ -66,7 +66,8 @@ public class BlackListEntity extends ArrayList impl add((Blacklisted) el); } else { try { - add(el.toString()); + if (el != null) + add(el.toString()); } catch (InvalidValueException e) { System.err.println((e.getCause() != null ? e.getCause() : e).getMessage()); }