Let developers construct the watcher themselves

This commit is contained in:
Andrew 2013-07-28 10:58:21 +12:00
parent 4c81ea1b95
commit e755ed24db

View File

@ -77,10 +77,14 @@ public class DisguiseAPI {
if (event.isCancelled())
return;
}
if (disguise.getWatcher() != null)
if (disguise.getEntity() != entity) {
if (disguise.getWatcher() != null) {
disguise = disguise.clone();
put(entity, disguise);
}
disguise.constructWatcher(plugin, entity);
}
put(entity, disguise);
refresh(entity);
}