Added null sanity checks in the flagwatcher

This commit is contained in:
Andrew 2013-11-06 21:48:15 +13:00
parent 897d6410d2
commit 331d254641

View File

@ -205,6 +205,8 @@ public class FlagWatcher {
protected void sendData(int data) {
if (disguise.getWatcher() == null || DisguiseAPI.getDisguise(disguise.getEntity()) != disguise)
return;
if (!entityValues.containsKey(data) || entityValues.get(data) == null)
return;
Entity entity = disguise.getEntity();
Object value = entityValues.get(data);
List<WatchableObject> list = new ArrayList<WatchableObject>();