Only check names if CombatTag is enabled.

This commit is contained in:
GJ 2013-04-29 00:29:38 -04:00
parent 15da9d580b
commit b97afb85a1
2 changed files with 5 additions and 2 deletions

View File

@ -82,8 +82,9 @@ public class mcMMO extends JavaPlugin {
// Update Check
private boolean updateAvailable;
// Spout Check
// Plugin Checks
public static boolean spoutEnabled;
public static boolean combatTagEnabled;
// XP Event Check
private boolean xpEventEnabled;
@ -113,6 +114,8 @@ public class mcMMO extends JavaPlugin {
setupSpout();
loadConfigFiles();
combatTagEnabled = getServer().getPluginManager().isPluginEnabled("CombatTag");
databaseManager = new DatabaseManager(this, Config.getInstance().getUseMySQL());
registerEvents();

View File

@ -44,7 +44,7 @@ public final class Misc {
}
public static boolean isNPCEntity(Entity entity) {
return (entity == null || entity.hasMetadata("NPC") || (entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger")));
return (entity == null || entity.hasMetadata("NPC") || (mcMMO.combatTagEnabled && entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger")));
}
/**