Avoid NPE on trying to delete non existant entity. Fixes MassiveCraft/Factions#722.

This commit is contained in:
Olof Larsson 2014-12-05 00:36:17 +01:00
parent 8777b9678f
commit 5f63d829e4

View File

@ -373,7 +373,9 @@ public class Coll<E> implements CollInterface<E>
if (oid == null) throw new NullPointerException("oid");
String id = this.fixId(oid);
E e = this.get(id);
E e = this.get(id, false);
if (e == null) return null;
this.detach(e, id);
return e;
}