mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
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:
parent
4fb4d6fc0c
commit
38e1947302
@ -88,7 +88,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
private boolean updateAvailable;
|
private boolean updateAvailable;
|
||||||
|
|
||||||
/* Plugin Checks */
|
/* Plugin Checks */
|
||||||
private static boolean combatTagEnabled;
|
|
||||||
private static boolean healthBarPluginEnabled;
|
private static boolean healthBarPluginEnabled;
|
||||||
|
|
||||||
// Config Validation Check
|
// Config Validation Check
|
||||||
@ -127,7 +126,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
metadataValue = new FixedMetadataValue(this, true);
|
metadataValue = new FixedMetadataValue(this, true);
|
||||||
|
|
||||||
PluginManager pluginManager = getServer().getPluginManager();
|
PluginManager pluginManager = getServer().getPluginManager();
|
||||||
combatTagEnabled = pluginManager.getPlugin("CombatTag") != null;
|
|
||||||
healthBarPluginEnabled = pluginManager.getPlugin("HealthBar") != null;
|
healthBarPluginEnabled = pluginManager.getPlugin("HealthBar") != null;
|
||||||
|
|
||||||
setupFilePaths();
|
setupFilePaths();
|
||||||
@ -315,10 +313,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
mcMMO.databaseManager = databaseManager;
|
mcMMO.databaseManager = databaseManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isCombatTagEnabled() {
|
|
||||||
return combatTagEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isHealthBarPluginEnabled() {
|
public static boolean isHealthBarPluginEnabled() {
|
||||||
return healthBarPluginEnabled;
|
return healthBarPluginEnabled;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ import java.util.Random;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.HumanEntity;
|
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.entity.NPC;
|
import org.bukkit.entity.NPC;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -51,7 +50,7 @@ public final class Misc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isNPCEntity(Entity entity) {
|
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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user