mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-09-10 06:48:06 +02:00
Update HumanController.java
This commit is contained in:
parent
516035fc70
commit
bd5ff4d433
@ -204,16 +204,18 @@ public class HumanController extends AbstractEntityController {
|
||||
}
|
||||
TEXTURE_CACHE.put(realUUID, new Property("textures", textures.getValue(), textures.getSignature()));
|
||||
}
|
||||
Bukkit.getScheduler().callSyncMethod(CitizensAPI.getPlugin(), new Callable<Void>() {
|
||||
@Override
|
||||
public Void call() {
|
||||
if (npc.isSpawned()) {
|
||||
npc.despawn(DespawnReason.PENDING_RESPAWN);
|
||||
npc.spawn(npc.getStoredLocation());
|
||||
if (CitizensAPI.getPlugin().isEnabled()) {
|
||||
Bukkit.getScheduler().callSyncMethod(CitizensAPI.getPlugin(), new Callable<Void>() {
|
||||
@Override
|
||||
public Void call() {
|
||||
if (npc.isSpawned()) {
|
||||
npc.despawn(DespawnReason.PENDING_RESPAWN);
|
||||
npc.spawn(npc.getStoredLocation());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user