Update HumanController.java

This commit is contained in:
fullwall 2014-12-26 17:45:49 +08:00
parent 516035fc70
commit bd5ff4d433

View File

@ -204,16 +204,18 @@ public class HumanController extends AbstractEntityController {
} }
TEXTURE_CACHE.put(realUUID, new Property("textures", textures.getValue(), textures.getSignature())); TEXTURE_CACHE.put(realUUID, new Property("textures", textures.getValue(), textures.getSignature()));
} }
Bukkit.getScheduler().callSyncMethod(CitizensAPI.getPlugin(), new Callable<Void>() { if (CitizensAPI.getPlugin().isEnabled()) {
@Override Bukkit.getScheduler().callSyncMethod(CitizensAPI.getPlugin(), new Callable<Void>() {
public Void call() { @Override
if (npc.isSpawned()) { public Void call() {
npc.despawn(DespawnReason.PENDING_RESPAWN); if (npc.isSpawned()) {
npc.spawn(npc.getStoredLocation()); npc.despawn(DespawnReason.PENDING_RESPAWN);
npc.spawn(npc.getStoredLocation());
}
return null;
} }
return null; });
} }
});
} }
} }