mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Fix issue with CombatTag NPC errors. Fixes #1012
NOTE: Do NOT change the default NPC name for CombatTag in your config, or this fix won't work.
This commit is contained in:
		@@ -5,6 +5,7 @@ import java.util.Random;
 | 
			
		||||
import org.bukkit.Location;
 | 
			
		||||
import org.bukkit.Material;
 | 
			
		||||
import org.bukkit.entity.Entity;
 | 
			
		||||
import org.bukkit.entity.HumanEntity;
 | 
			
		||||
import org.bukkit.entity.Item;
 | 
			
		||||
import org.bukkit.entity.Player;
 | 
			
		||||
import org.bukkit.inventory.ItemStack;
 | 
			
		||||
@@ -43,11 +44,7 @@ public final class Misc {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static boolean isNPCEntity(Entity entity) {
 | 
			
		||||
        if (entity == null || entity.hasMetadata("NPC")) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return false;
 | 
			
		||||
        return (entity == null || entity.hasMetadata("NPC") || (entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger")));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user