mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-02 22:07:50 +01:00
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:
parent
48d6c141ca
commit
35f30e3b53
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>NoCheat</groupId>
|
<groupId>NoCheat</groupId>
|
||||||
<artifactId>NoCheat</artifactId>
|
<artifactId>NoCheat</artifactId>
|
||||||
<version>2.17</version>
|
<version>2.17a</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>NoCheat</name>
|
<name>NoCheat</name>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -63,7 +63,6 @@ public abstract class Configuration {
|
|||||||
|
|
||||||
private final static OptionNode BLOCKBREAK_REACH = new OptionNode("reach", BLOCKBREAK, DataType.PARENT);
|
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_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);
|
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);
|
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);
|
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_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);
|
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);
|
private final static OptionNode BLOCKPLACE_DIRECTION = new OptionNode("direction", BLOCKPLACE, DataType.PARENT);
|
||||||
|
@ -90,7 +90,6 @@ public class DefaultConfiguration extends Configuration {
|
|||||||
setValue(BLOCKBREAK_CHECK, true);
|
setValue(BLOCKBREAK_CHECK, true);
|
||||||
|
|
||||||
setValue(BLOCKBREAK_REACH_CHECK, true);
|
setValue(BLOCKBREAK_REACH_CHECK, true);
|
||||||
setValue(BLOCKBREAK_REACH_LIMIT, 485);
|
|
||||||
|
|
||||||
ActionList reachActionList = new ActionList();
|
ActionList reachActionList = new ActionList();
|
||||||
reachActionList.setActions(0, action.getActions("blockbreakCancel".split(" ")));
|
reachActionList.setActions(0, action.getActions("blockbreakCancel".split(" ")));
|
||||||
@ -117,7 +116,6 @@ public class DefaultConfiguration extends Configuration {
|
|||||||
setValue(BLOCKPLACE_CHECK, true);
|
setValue(BLOCKPLACE_CHECK, true);
|
||||||
|
|
||||||
setValue(BLOCKPLACE_REACH_CHECK, true);
|
setValue(BLOCKPLACE_REACH_CHECK, true);
|
||||||
setValue(BLOCKPLACE_REACH_LIMIT, 485);
|
|
||||||
|
|
||||||
ActionList reachActionList = new ActionList();
|
ActionList reachActionList = new ActionList();
|
||||||
reachActionList.setActions(0, action.getActions("blockplaceCancel".split(" ")));
|
reachActionList.setActions(0, action.getActions("blockplaceCancel".split(" ")));
|
||||||
|
@ -55,7 +55,6 @@ public class Explainations {
|
|||||||
set(Configuration.BLOCKBREAK_CHECK, "If true, do various checks on BlockBreak events.");
|
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_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_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.");
|
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_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_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_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.");
|
set(Configuration.BLOCKPLACE_DIRECTION_CHECK, "If true, check if a player is looking at the block that he's placing.");
|
||||||
|
@ -26,7 +26,7 @@ public class CCBlockBreak {
|
|||||||
|
|
||||||
check = data.getBoolean(Configuration.BLOCKBREAK_CHECK);
|
check = data.getBoolean(Configuration.BLOCKBREAK_CHECK);
|
||||||
reachCheck = data.getBoolean(Configuration.BLOCKBREAK_REACH_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);
|
reachActions = data.getActionList(Configuration.BLOCKBREAK_REACH_ACTIONS);
|
||||||
checkinstabreakblocks = data.getBoolean(Configuration.BLOCKBREAK_DIRECTION_CHECKINSTABREAKBLOCKS);
|
checkinstabreakblocks = data.getBoolean(Configuration.BLOCKBREAK_DIRECTION_CHECKINSTABREAKBLOCKS);
|
||||||
directionCheck = data.getBoolean(Configuration.BLOCKBREAK_DIRECTION_CHECK);
|
directionCheck = data.getBoolean(Configuration.BLOCKBREAK_DIRECTION_CHECK);
|
||||||
|
@ -24,7 +24,7 @@ public class CCBlockPlace {
|
|||||||
check = data.getBoolean(Configuration.BLOCKPLACE_CHECK);
|
check = data.getBoolean(Configuration.BLOCKPLACE_CHECK);
|
||||||
|
|
||||||
reachCheck = data.getBoolean(Configuration.BLOCKPLACE_REACH_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);
|
reachActions = data.getActionList(Configuration.BLOCKPLACE_REACH_ACTIONS);
|
||||||
|
|
||||||
directionCheck = data.getBoolean(Configuration.BLOCKPLACE_DIRECTION_CHECK);
|
directionCheck = data.getBoolean(Configuration.BLOCKPLACE_DIRECTION_CHECK);
|
||||||
|
@ -25,8 +25,7 @@ public class NoCheatPlayerImpl implements NoCheatPlayer {
|
|||||||
protected static Method incAge = null;
|
protected static Method incAge = null;
|
||||||
|
|
||||||
public NoCheatPlayerImpl(Player player, NoCheat plugin, BaseData data) {
|
public NoCheatPlayerImpl(Player player, NoCheat plugin, BaseData data) {
|
||||||
|
|
||||||
System.out.println(incAge != null ? incAge.toString() : null);
|
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
|
Loading…
Reference in New Issue
Block a user