mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Only check names if CombatTag is enabled.
This commit is contained in:
parent
15da9d580b
commit
b97afb85a1
@ -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();
|
||||
|
@ -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")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user