diff --git a/pom.xml b/pom.xml index 730ff014..271f151c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 NoCheat NoCheat - 2.17 + 2.17a jar NoCheat diff --git a/src/cc/co/evenprime/bukkit/nocheat/config/Configuration.java b/src/cc/co/evenprime/bukkit/nocheat/config/Configuration.java index 269beb66..2ed17541 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/config/Configuration.java +++ b/src/cc/co/evenprime/bukkit/nocheat/config/Configuration.java @@ -63,7 +63,6 @@ public abstract class Configuration { private final static OptionNode BLOCKBREAK_REACH = new OptionNode("reach", BLOCKBREAK, DataType.PARENT); public final static OptionNode BLOCKBREAK_REACH_CHECK = new OptionNode("check", BLOCKBREAK_REACH, DataType.BOOLEAN); - public final static OptionNode BLOCKBREAK_REACH_LIMIT = new OptionNode("limit", BLOCKBREAK_REACH, DataType.INTEGER); public final static OptionNode BLOCKBREAK_REACH_ACTIONS = new OptionNode("actions", BLOCKBREAK_REACH, DataType.ACTIONLIST); private final static OptionNode BLOCKBREAK_DIRECTION = new OptionNode("direction", BLOCKBREAK, DataType.PARENT); @@ -82,7 +81,6 @@ public abstract class Configuration { private final static OptionNode BLOCKPLACE_REACH = new OptionNode("reach", BLOCKPLACE, DataType.PARENT); public final static OptionNode BLOCKPLACE_REACH_CHECK = new OptionNode("check", BLOCKPLACE_REACH, DataType.BOOLEAN); - public final static OptionNode BLOCKPLACE_REACH_LIMIT = new OptionNode("limit", BLOCKPLACE_REACH, DataType.INTEGER); public final static OptionNode BLOCKPLACE_REACH_ACTIONS = new OptionNode("actions", BLOCKPLACE_REACH, DataType.ACTIONLIST); private final static OptionNode BLOCKPLACE_DIRECTION = new OptionNode("direction", BLOCKPLACE, DataType.PARENT); diff --git a/src/cc/co/evenprime/bukkit/nocheat/config/DefaultConfiguration.java b/src/cc/co/evenprime/bukkit/nocheat/config/DefaultConfiguration.java index 13999257..2be0cf4b 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/config/DefaultConfiguration.java +++ b/src/cc/co/evenprime/bukkit/nocheat/config/DefaultConfiguration.java @@ -90,7 +90,6 @@ public class DefaultConfiguration extends Configuration { setValue(BLOCKBREAK_CHECK, true); setValue(BLOCKBREAK_REACH_CHECK, true); - setValue(BLOCKBREAK_REACH_LIMIT, 485); ActionList reachActionList = new ActionList(); reachActionList.setActions(0, action.getActions("blockbreakCancel".split(" "))); @@ -117,7 +116,6 @@ public class DefaultConfiguration extends Configuration { setValue(BLOCKPLACE_CHECK, true); setValue(BLOCKPLACE_REACH_CHECK, true); - setValue(BLOCKPLACE_REACH_LIMIT, 485); ActionList reachActionList = new ActionList(); reachActionList.setActions(0, action.getActions("blockplaceCancel".split(" "))); diff --git a/src/cc/co/evenprime/bukkit/nocheat/config/Explainations.java b/src/cc/co/evenprime/bukkit/nocheat/config/Explainations.java index 46a6f33f..a58a1fcd 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/config/Explainations.java +++ b/src/cc/co/evenprime/bukkit/nocheat/config/Explainations.java @@ -55,7 +55,6 @@ public class Explainations { set(Configuration.BLOCKBREAK_CHECK, "If true, do various checks on BlockBreak events."); set(Configuration.BLOCKBREAK_REACH_CHECK, "If true, check if a player is breaking blocks that are too far away."); - set(Configuration.BLOCKBREAK_REACH_LIMIT, "Set the distance limit for breaking blocks.\nUnit is 1/100 of a block, default is 485"); set(Configuration.BLOCKBREAK_REACH_ACTIONS, "What should be done if a player is breaking blocks that are too far away.\nUnit is number of break(attempt)s beyond the limit."); set(Configuration.BLOCKBREAK_DIRECTION_CHECK, "If true, check if a player is looking at the block that he's breaking."); @@ -70,7 +69,6 @@ public class Explainations { set(Configuration.BLOCKPLACE_CHECK, "If true, do various checks on BlockPlace events."); set(Configuration.BLOCKPLACE_REACH_CHECK, "If true, check if a player is placing blocks at locations too far away."); - set(Configuration.BLOCKPLACE_REACH_LIMIT, "Set the distance limit for placing blocks.\nUnit is 1/100 of a block, default is 485"); set(Configuration.BLOCKPLACE_REACH_ACTIONS, "What should be done if a player is placing blocks that are too far away.\nUnit is number of place(attempt)s beyond the limit."); set(Configuration.BLOCKPLACE_DIRECTION_CHECK, "If true, check if a player is looking at the block that he's placing."); diff --git a/src/cc/co/evenprime/bukkit/nocheat/config/cache/CCBlockBreak.java b/src/cc/co/evenprime/bukkit/nocheat/config/cache/CCBlockBreak.java index c3f8e92b..8ddecdec 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/config/cache/CCBlockBreak.java +++ b/src/cc/co/evenprime/bukkit/nocheat/config/cache/CCBlockBreak.java @@ -26,7 +26,7 @@ public class CCBlockBreak { check = data.getBoolean(Configuration.BLOCKBREAK_CHECK); reachCheck = data.getBoolean(Configuration.BLOCKBREAK_REACH_CHECK); - reachDistance = ((double) data.getInteger(Configuration.BLOCKBREAK_REACH_LIMIT)) / 100D; + reachDistance = 535D / 100D; reachActions = data.getActionList(Configuration.BLOCKBREAK_REACH_ACTIONS); checkinstabreakblocks = data.getBoolean(Configuration.BLOCKBREAK_DIRECTION_CHECKINSTABREAKBLOCKS); directionCheck = data.getBoolean(Configuration.BLOCKBREAK_DIRECTION_CHECK); diff --git a/src/cc/co/evenprime/bukkit/nocheat/config/cache/CCBlockPlace.java b/src/cc/co/evenprime/bukkit/nocheat/config/cache/CCBlockPlace.java index b0a93a8c..be62a5d6 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/config/cache/CCBlockPlace.java +++ b/src/cc/co/evenprime/bukkit/nocheat/config/cache/CCBlockPlace.java @@ -24,7 +24,7 @@ public class CCBlockPlace { check = data.getBoolean(Configuration.BLOCKPLACE_CHECK); reachCheck = data.getBoolean(Configuration.BLOCKPLACE_REACH_CHECK); - reachDistance = data.getInteger(Configuration.BLOCKPLACE_REACH_LIMIT); + reachDistance = 535D / 100D; reachActions = data.getActionList(Configuration.BLOCKPLACE_REACH_ACTIONS); directionCheck = data.getBoolean(Configuration.BLOCKPLACE_DIRECTION_CHECK); diff --git a/src/cc/co/evenprime/bukkit/nocheat/player/NoCheatPlayerImpl.java b/src/cc/co/evenprime/bukkit/nocheat/player/NoCheatPlayerImpl.java index 0624b781..6dfba091 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/player/NoCheatPlayerImpl.java +++ b/src/cc/co/evenprime/bukkit/nocheat/player/NoCheatPlayerImpl.java @@ -25,8 +25,7 @@ public class NoCheatPlayerImpl implements NoCheatPlayer { protected static Method incAge = null; public NoCheatPlayerImpl(Player player, NoCheat plugin, BaseData data) { - - System.out.println(incAge != null ? incAge.toString() : null); + this.player = player; this.plugin = plugin; this.data = data;