fixed safelog npcs sticking around some time
This commit is contained in:
parent
60a78e396f
commit
3773ab3f0b
@ -15,6 +15,7 @@ import org.bukkit.event.entity.EntityCombustEvent;
|
|||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.world.ChunkUnloadEvent;
|
import org.bukkit.event.world.ChunkUnloadEvent;
|
||||||
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
import mineplex.core.MiniPlugin;
|
||||||
import mineplex.core.hologram.HologramManager;
|
import mineplex.core.hologram.HologramManager;
|
||||||
@ -82,7 +83,7 @@ public class NPCManager extends MiniPlugin
|
|||||||
{
|
{
|
||||||
for (LivingEntity entity : Spawn.getSpawnWorld().getLivingEntities())
|
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();
|
entity.remove();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user