Fixed default distance limits for "Reach" checks to new, bigger

values + removed a debug output line that I forgot to remove before
This commit is contained in:
Evenprime 2011-11-23 23:00:09 +01:00
parent 48d6c141ca
commit 35f30e3b53
7 changed files with 4 additions and 11 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>NoCheat</groupId>
<artifactId>NoCheat</artifactId>
<version>2.17</version>
<version>2.17a</version>
<packaging>jar</packaging>
<name>NoCheat</name>
<properties>

View File

@ -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);

View File

@ -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(" ")));

View File

@ -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.");

View File

@ -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);

View File

@ -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);

View File

@ -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;