Remove PvpLogger checks

No longer needed when testing with Combat Tag v6.1.4, the NPCs have
metadata „NPC”.

Fixes #2017
This commit is contained in:
TfT_02 2014-06-08 18:11:18 +02:00
parent 4fb4d6fc0c
commit 38e1947302
2 changed files with 1 additions and 8 deletions

View File

@ -88,7 +88,6 @@ public class mcMMO extends JavaPlugin {
private boolean updateAvailable;
/* Plugin Checks */
private static boolean combatTagEnabled;
private static boolean healthBarPluginEnabled;
// Config Validation Check
@ -127,7 +126,6 @@ public class mcMMO extends JavaPlugin {
metadataValue = new FixedMetadataValue(this, true);
PluginManager pluginManager = getServer().getPluginManager();
combatTagEnabled = pluginManager.getPlugin("CombatTag") != null;
healthBarPluginEnabled = pluginManager.getPlugin("HealthBar") != null;
setupFilePaths();
@ -315,10 +313,6 @@ public class mcMMO extends JavaPlugin {
mcMMO.databaseManager = databaseManager;
}
public static boolean isCombatTagEnabled() {
return combatTagEnabled;
}
public static boolean isHealthBarPluginEnabled() {
return healthBarPluginEnabled;
}

View File

@ -6,7 +6,6 @@ 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.NPC;
import org.bukkit.entity.Player;
@ -51,7 +50,7 @@ public final class Misc {
}
public static boolean isNPCEntity(Entity entity) {
return (entity == null || entity.hasMetadata("NPC") || entity instanceof NPC || (mcMMO.isCombatTagEnabled() && entity instanceof HumanEntity && ((HumanEntity) entity).getName().contains("PvpLogger")) || entity.getClass().getName().equalsIgnoreCase("cofh.entity.PlayerFake"));
return (entity == null || entity.hasMetadata("NPC") || entity instanceof NPC || entity.getClass().getName().equalsIgnoreCase("cofh.entity.PlayerFake"));
}
/**