mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Another quick check to avoid issues with NPCs.
This commit is contained in:
		@@ -13,6 +13,7 @@ import org.bukkit.block.BlockState;
 | 
			
		||||
import org.bukkit.block.Furnace;
 | 
			
		||||
import org.bukkit.entity.Entity;
 | 
			
		||||
import org.bukkit.entity.HumanEntity;
 | 
			
		||||
import org.bukkit.entity.NPC;
 | 
			
		||||
import org.bukkit.entity.Player;
 | 
			
		||||
import org.bukkit.event.inventory.InventoryEvent;
 | 
			
		||||
import org.bukkit.inventory.FurnaceInventory;
 | 
			
		||||
@@ -60,7 +61,7 @@ public final class Misc {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static boolean isNPCEntity(Entity entity) {
 | 
			
		||||
        return (entity == null || entity.hasMetadata("NPC") || (mcMMO.isCombatTagEnabled() && entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger")));
 | 
			
		||||
        return (entity == null || entity.hasMetadata("NPC") || entity instanceof NPC || (mcMMO.isCombatTagEnabled() && entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger")));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user