From 3773ab3f0ba277aa040700cddc5b8b1ccf283a0f Mon Sep 17 00:00:00 2001 From: NewGarbo Date: Mon, 11 Jan 2016 10:14:32 +0000 Subject: [PATCH] fixed safelog npcs sticking around some time --- .../mineplex/game/clans/gameplay/safelog/npc/NPCManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/safelog/npc/NPCManager.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/safelog/npc/NPCManager.java index 5998a312f..696c9592d 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/safelog/npc/NPCManager.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/safelog/npc/NPCManager.java @@ -15,6 +15,7 @@ import org.bukkit.event.entity.EntityCombustEvent; import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.world.ChunkUnloadEvent; +import org.bukkit.metadata.FixedMetadataValue; import mineplex.core.MiniPlugin; import mineplex.core.hologram.HologramManager; @@ -82,7 +83,7 @@ public class NPCManager extends MiniPlugin { for (LivingEntity entity : Spawn.getSpawnWorld().getLivingEntities()) { - if (entity.hasMetadata("CombatLogNPC")) + if (entity.hasMetadata("CombatLogNPC") && ((FixedMetadataValue) entity.getMetadata("CombatLogNPC").get(0)).asString().equals(event.getPlayer().getUniqueId().toString())) { entity.remove(); }