mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-02 21:41:43 +01:00
Check NPC spawned
This commit is contained in:
parent
b21af8dd6e
commit
f759c81763
@ -92,6 +92,8 @@ public class ScoreboardTrait extends Trait {
|
||||
if (team == null || name == null || !team.hasEntry(name))
|
||||
return;
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(CitizensAPI.getPlugin(), () -> {
|
||||
if (npc.isSpawned())
|
||||
return;
|
||||
if (team.getSize() == 1) {
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
metadata.remove(player.getUniqueId(), team.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user