From e26e174837350ec6402ab6c40707950acffa7efe Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Sat, 13 Feb 2016 20:24:37 +0100 Subject: [PATCH] Fail Safe NPCs --- src/com/massivecraft/massivecore/store/SenderColl.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/com/massivecraft/massivecore/store/SenderColl.java b/src/com/massivecraft/massivecore/store/SenderColl.java index 8c223e1f..e8a7134c 100644 --- a/src/com/massivecraft/massivecore/store/SenderColl.java +++ b/src/com/massivecraft/massivecore/store/SenderColl.java @@ -42,22 +42,17 @@ public class SenderColl> extends Coll implements Se // OVERRIDE: Coll // -------------------------------------------- // - public static void denyNpc(Object oid) - { - if (MUtil.isNpc(oid)) throw new IllegalArgumentException("NPCs are not allowed: " + oid); - } - @Override public E get(Object oid) { - denyNpc(oid); + if (MUtil.isNpc(oid)) return null; return super.get(oid); } @Override public E get(Object oid, boolean creative) { - denyNpc(oid); + if (MUtil.isNpc(oid)) return null; return super.get(oid, creative); }