diff --git a/src/main/java/net/h31ix/anticheat/xray/XRayListener.java b/src/main/java/net/h31ix/anticheat/xray/XRayListener.java index b4490f7..194bb65 100644 --- a/src/main/java/net/h31ix/anticheat/xray/XRayListener.java +++ b/src/main/java/net/h31ix/anticheat/xray/XRayListener.java @@ -52,10 +52,6 @@ public class XRayListener implements Listener { tracker.addIron(player); } - else if (m == Material.COAL_ORE) - { - tracker.addCoal(player); - } else if (m == Material.GOLD_ORE) { tracker.addGold(player); diff --git a/src/main/java/net/h31ix/anticheat/xray/XRayStats.java b/src/main/java/net/h31ix/anticheat/xray/XRayStats.java index 936360c..0a425db 100644 --- a/src/main/java/net/h31ix/anticheat/xray/XRayStats.java +++ b/src/main/java/net/h31ix/anticheat/xray/XRayStats.java @@ -27,12 +27,11 @@ public class XRayStats private double d = 0; private double g = 0; private double i = 0; - private double c = 0; private double l = 0; private double r = 0; private double o = 0; - public XRayStats(String player, Map diamond, Map gold, Map iron, Map coal, Map lapis, Map redstone, Map other, Map total) + public XRayStats(String player, Map diamond, Map gold, Map iron, Map lapis, Map redstone, Map other, Map total) { if (total.get(player) != null) { @@ -50,10 +49,6 @@ public class XRayStats { i = (iron.get(player) / t) * DIVISOR; } - if (coal.get(player) != null) - { - c = (coal.get(player) / t) * DIVISOR; - } if (lapis.get(player) != null) { l = (lapis.get(player) / t) * DIVISOR; @@ -88,11 +83,6 @@ public class XRayStats return i; } - public double getCoal() - { - return c; - } - public double getLapis() { return l; diff --git a/src/main/java/net/h31ix/anticheat/xray/XRayTracker.java b/src/main/java/net/h31ix/anticheat/xray/XRayTracker.java index 92c6cf6..d4c3006 100644 --- a/src/main/java/net/h31ix/anticheat/xray/XRayTracker.java +++ b/src/main/java/net/h31ix/anticheat/xray/XRayTracker.java @@ -30,7 +30,6 @@ public class XRayTracker private Map diamond = new HashMap(); private Map gold = new HashMap(); private Map iron = new HashMap(); - private Map coal = new HashMap(); private Map lapis = new HashMap(); private Map redstone = new HashMap(); private Map block = new HashMap(); @@ -70,9 +69,9 @@ public class XRayTracker public boolean hasAbnormal(String player) { - XRayStats stats = new XRayStats(player, diamond, gold, iron, coal, lapis, redstone, block, totalblock); + XRayStats stats = new XRayStats(player, diamond, gold, iron, lapis, redstone, block, totalblock); double total = stats.getOther(); - return calculate(player, stats.getDiamond(), total) || calculate(player, stats.getGold(), total) || calculate(player, stats.getIron(), total) || calculate(player, stats.getCoal(), total) || calculate(player, stats.getLapis(), total) || calculate(player, stats.getRedstone(), total); + return calculate(player, stats.getDiamond(), total) || calculate(player, stats.getGold(), total) || calculate(player, stats.getIron(), total) || calculate(player, stats.getLapis(), total) || calculate(player, stats.getRedstone(), total); } public boolean hasAlerted(String player) @@ -92,7 +91,7 @@ public class XRayTracker public void getStats(CommandSender cs, String player) { - XRayStats stats = new XRayStats(player, diamond, gold, iron, coal, lapis, redstone, block, totalblock); + XRayStats stats = new XRayStats(player, diamond, gold, iron, lapis, redstone, block, totalblock); double total = stats.getOther(); cs.sendMessage("--------------------[" + GREEN + "X-Ray Stats" + WHITE + "]---------------------"); cs.sendMessage(GRAY + "Player: " + WHITE + player); @@ -100,7 +99,6 @@ public class XRayTracker calculate(cs, player, stats.getDiamond(), total, "diamond"); calculate(cs, player, stats.getGold(), total, "gold"); calculate(cs, player, stats.getIron(), total, "iron"); - calculate(cs, player, stats.getCoal(), total, "coal"); calculate(cs, player, stats.getLapis(), total, "lapis"); calculate(cs, player, stats.getRedstone(), total, "redstone"); cs.sendMessage(GRAY + "Percent all other blocks: " + WHITE + round(stats.getOther()) + "%"); @@ -117,11 +115,6 @@ public class XRayTracker addOre(player, gold); } - public void addCoal(String player) - { - addOre(player, coal); - } - public void addIron(String player) { addOre(player, iron); @@ -175,7 +168,6 @@ public class XRayTracker diamond.put(player, 0); iron.put(player, 0); gold.put(player, 0); - coal.put(player, 0); redstone.put(player, 0); lapis.put(player, 0); totalblock.put(player, 0);