mirror of
https://github.com/Updated-NoCheatPlus/NoCheatPlus.git
synced 2026-11-08 09:35:18 -05:00
Compare commits
39
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dec9f754e6 | ||
|
|
063f9fd116 | ||
|
|
0d652109d2 | ||
|
|
ba3348e02e | ||
|
|
c06e2b6468 | ||
|
|
cb6113a36e | ||
|
|
60647d3a03 | ||
|
|
e853eacb3a | ||
|
|
908751e7b6 | ||
|
|
a0d75fc566 | ||
|
|
7f65bd12e6 | ||
|
|
82e8e389c0 | ||
|
|
16b32cb953 | ||
|
|
a6b09f90a1 | ||
|
|
7b4a48e8a9 | ||
|
|
69463aff6b | ||
|
|
75eaab9da0 | ||
|
|
34cd09a70c | ||
|
|
a628b4597c | ||
|
|
94bb30781a | ||
|
|
c0fbe776f0 | ||
|
|
3d9d66e199 | ||
|
|
c58ab8e676 | ||
|
|
a2562d1e6e | ||
|
|
a6f1119db0 | ||
|
|
cf8be9da54 | ||
|
|
13d14b1fc6 | ||
|
|
bdf2fc950a | ||
|
|
c69b6f8e8b | ||
|
|
af429a1740 | ||
|
|
d45afcf169 | ||
|
|
c5e1b47a97 | ||
|
|
9c2c0a5326 | ||
|
|
ae34de5ba1 | ||
|
|
3afbbaea79 | ||
|
|
243dac7aed | ||
|
|
266a15c4bf | ||
|
|
70d58208cc | ||
|
|
755514d4c5 |
No files matched your search
@@ -2,7 +2,7 @@
|
||||
name: Feature/Check Request
|
||||
about: 'Suggest a feature or check '
|
||||
title: ''
|
||||
labels: ''
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
+4
@@ -56,6 +56,8 @@ public class BlockBreakConfig extends ACheckConfig {
|
||||
public final ActionList reachActions;
|
||||
|
||||
public final float wrongBLockLevel;
|
||||
public final boolean wrongBlockImprobableFeedOnly;
|
||||
public final float wrongBlockImprobableWeight;
|
||||
public final ActionList wrongBlockActions;
|
||||
|
||||
/**
|
||||
@@ -93,6 +95,8 @@ public class BlockBreakConfig extends ACheckConfig {
|
||||
noSwingActions = config.getOptimizedActionList(ConfPaths.BLOCKBREAK_NOSWING_ACTIONS, Permissions.BLOCKBREAK_NOSWING);
|
||||
|
||||
reachActions = config.getOptimizedActionList(ConfPaths.BLOCKBREAK_REACH_ACTIONS, Permissions.BLOCKBREAK_REACH);
|
||||
wrongBlockImprobableFeedOnly = config.getBoolean(ConfPaths.BLOCKBREAK_WRONGBLOCK_IMPROBABLE_FEEDONLY);
|
||||
wrongBlockImprobableWeight = (float) config.getDouble(ConfPaths.BLOCKBREAK_WRONGBLOCK_IMPROBABLE_WEIGHT);
|
||||
|
||||
wrongBLockLevel = config.getInt(ConfPaths.BLOCKBREAK_WRONGBLOCK_LEVEL);
|
||||
wrongBlockActions = config.getOptimizedActionList(ConfPaths.BLOCKBREAK_WRONGBLOCK_ACTIONS, Permissions.BLOCKBREAK_WRONGBLOCK);
|
||||
|
||||
@@ -42,6 +42,7 @@ public class WrongBlock extends Check {
|
||||
* @param isInstaBreak
|
||||
* @return
|
||||
*/
|
||||
|
||||
public boolean check(final Player player, final Block block,
|
||||
final BlockBreakConfig cc, final BlockBreakData data, final IPlayerData pData,
|
||||
final AlmostBoolean isInstaBreak) {
|
||||
@@ -90,8 +91,12 @@ public class WrongBlock extends Check {
|
||||
if (executeActions(player, score, 1D, cc.wrongBlockActions).willCancel()) {
|
||||
cancel = true;
|
||||
}
|
||||
if (Improbable.check(player, 2.0f, now, "blockbreak.wrongblock", pData)) {
|
||||
cancel = true;
|
||||
if (cc.wrongBlockImprobableWeight > 0.0f) {
|
||||
if (cc.wrongBlockImprobableFeedOnly) {
|
||||
Improbable.feed(player, cc.wrongBlockImprobableWeight, now);
|
||||
} else if (Improbable.check(player, cc.wrongBlockImprobableWeight, now, "blockbreak.wrongblock", pData)) {
|
||||
cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-3
@@ -42,16 +42,20 @@ public class BlockPlaceConfig extends ACheckConfig {
|
||||
public final int fastPlaceLimit;
|
||||
public final int fastPlaceShortTermTicks;
|
||||
public final int fastPlaceShortTermLimit;
|
||||
public final boolean fastPlaceImprobableFeedOnly;
|
||||
public final float fastPlaceImprobableWeight;
|
||||
public final ActionList fastPlaceActions;
|
||||
|
||||
public final Set<Material> noSwingExceptions = new HashSet<Material>();
|
||||
public final ActionList noSwingActions;
|
||||
|
||||
public final ActionList reachActions;
|
||||
|
||||
|
||||
public final ActionList scaffoldActions;
|
||||
|
||||
public final long speedInterval;
|
||||
public final boolean speedImprobableFeedOnly;
|
||||
public final float speedImprobableWeight;
|
||||
public final ActionList speedActions;
|
||||
|
||||
/** General activation flag. */
|
||||
@@ -78,16 +82,20 @@ public class BlockPlaceConfig extends ACheckConfig {
|
||||
fastPlaceLimit = config.getInt(ConfPaths.BLOCKPLACE_FASTPLACE_LIMIT);
|
||||
fastPlaceShortTermTicks = config.getInt(ConfPaths.BLOCKPLACE_FASTPLACE_SHORTTERM_TICKS);
|
||||
fastPlaceShortTermLimit = config.getInt(ConfPaths.BLOCKPLACE_FASTPLACE_SHORTTERM_LIMIT);
|
||||
fastPlaceImprobableFeedOnly = config.getBoolean(ConfPaths.BLOCKPLACE_FASTPLACE_IMPROBABLE_FEEDONLY);
|
||||
fastPlaceImprobableWeight = (float) config.getDouble(ConfPaths.BLOCKPLACE_FASTPLACE_IMPROBABLE_WEIGHT);
|
||||
fastPlaceActions = config.getOptimizedActionList(ConfPaths.BLOCKPLACE_FASTPLACE_ACTIONS, Permissions.BLOCKPLACE_FASTPLACE);
|
||||
|
||||
config.readMaterialFromList(ConfPaths.BLOCKPLACE_NOSWING_EXCEPTIONS, noSwingExceptions);
|
||||
noSwingActions = config.getOptimizedActionList(ConfPaths.BLOCKPLACE_NOSWING_ACTIONS, Permissions.BLOCKPLACE_NOSWING);
|
||||
|
||||
reachActions = config.getOptimizedActionList(ConfPaths.BLOCKPLACE_REACH_ACTIONS, Permissions.BLOCKPLACE_REACH);
|
||||
|
||||
scaffoldActions = config.getOptimizedActionList(ConfPaths.BLOCKPLACE_SCAFFOLD_ACTIONS, Permissions.BLOCKPLACE_REACH);
|
||||
|
||||
scaffoldActions = config.getOptimizedActionList(ConfPaths.BLOCKPLACE_SCAFFOLD_ACTIONS, Permissions.BLOCKPLACE_REACH);
|
||||
|
||||
speedInterval = config.getLong(ConfPaths.BLOCKPLACE_SPEED_INTERVAL);
|
||||
speedImprobableFeedOnly = config.getBoolean(ConfPaths.BLOCKPLACE_SPEED_IMPROBABLE_FEEDONLY);
|
||||
speedImprobableWeight = (float) config.getDouble(ConfPaths.BLOCKPLACE_SPEED_IMPROBABLE_WEIGHT);
|
||||
speedActions = config.getOptimizedActionList(ConfPaths.BLOCKPLACE_SPEED_ACTIONS, Permissions.BLOCKPLACE_SPEED);
|
||||
|
||||
preventBoatsAnywhere = config.getBoolean(ConfPaths.BLOCKPLACE_PREVENTMISC_BOATSANYWHERE);
|
||||
|
||||
+12
-6
@@ -234,9 +234,12 @@ public class BlockPlaceListener extends CheckListener {
|
||||
if (fastPlace.check(player, block, tick, data, cc, pData)) {
|
||||
cancelled = true;
|
||||
}
|
||||
else {
|
||||
// Feed the improbable.
|
||||
Improbable.feed(player, 0.5f, System.currentTimeMillis(), pData);
|
||||
else if (cc.fastPlaceImprobableWeight > 0.0f) {
|
||||
if (cc.fastPlaceImprobableFeedOnly) {
|
||||
Improbable.feed(player, cc.fastPlaceImprobableWeight, System.currentTimeMillis());
|
||||
} else if (Improbable.check(player, cc.fastPlaceImprobableWeight, System.currentTimeMillis(), "blockplace.fastplace", pData)) {
|
||||
cancelled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -513,9 +516,12 @@ public class BlockPlaceListener extends CheckListener {
|
||||
// If the check was positive, cancel the event.
|
||||
cancel = true;
|
||||
}
|
||||
else if (Improbable.check(player, 0.6f, now, "blockplace.speed", pData)) {
|
||||
// Combined fighting speed.
|
||||
cancel = true;
|
||||
else if (cc.speedImprobableWeight > 0.0f) {
|
||||
if (cc.speedImprobableFeedOnly) {
|
||||
Improbable.feed(player, cc.speedImprobableWeight, now);
|
||||
} else if (Improbable.check(player, cc.speedImprobableWeight, now, "blockplace.speed", pData)) {
|
||||
cancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -198,10 +198,15 @@ public class Combined {
|
||||
Math.max(cc.yawRatePenaltyFactor * amount , cc.yawRatePenaltyMin),
|
||||
cc.yawRatePenaltyMax));
|
||||
// TODO: balance (100 ... 200 ) ?
|
||||
if (cc.yawRateImprobable && Improbable.check(player, amount / 100f, now, "combined.yawrate",
|
||||
pData))
|
||||
cancel = true;
|
||||
}
|
||||
// TODO: New calculations so that weight is not inverse
|
||||
if (cc.yawRateImprobableWeight > 0.0f) {
|
||||
if (cc.yawRateImprobableFeedOnly) {
|
||||
Improbable.feed(player, amount / cc.yawRateImprobableWeight, now);
|
||||
} else if (Improbable.check(player, amount / cc.yawRateImprobableWeight, now, "combined.yawrate", pData)) {
|
||||
cancel = true;
|
||||
}
|
||||
}
|
||||
} // Improbable.check(player, amount / 100f, now, "combined.yawrate", pData)
|
||||
if (data.timeFreeze.isPenalty()) {
|
||||
cancel = true;
|
||||
}
|
||||
|
||||
+4
-2
@@ -59,7 +59,8 @@ public class CombinedConfig extends ACheckConfig {
|
||||
|
||||
// Last yaw tracking
|
||||
public final float yawRate;
|
||||
public final boolean yawRateImprobable;
|
||||
public final boolean yawRateImprobableFeedOnly;
|
||||
public final float yawRateImprobableWeight;
|
||||
public final float yawRatePenaltyFactor;
|
||||
public final int yawRatePenaltyMin;
|
||||
public final int yawRatePenaltyMax;
|
||||
@@ -116,7 +117,8 @@ public class CombinedConfig extends ACheckConfig {
|
||||
munchHausenActions = config.getOptimizedActionList(ConfPaths.COMBINED_MUNCHHAUSEN_ACTIONS, Permissions.COMBINED_MUNCHHAUSEN);
|
||||
|
||||
yawRate = config.getInt(ConfPaths.COMBINED_YAWRATE_RATE);
|
||||
yawRateImprobable = config.getBoolean(ConfPaths.COMBINED_YAWRATE_IMPROBABLE);
|
||||
yawRateImprobableFeedOnly = config.getBoolean(ConfPaths.COMBINED_YAWRATE_IMPROBABLE_FEEDONLY);
|
||||
yawRateImprobableWeight = (float) config.getDouble(ConfPaths.COMBINED_YAWRATE_IMPROBABLE_WEIGHT);
|
||||
yawRatePenaltyFactor = (float) config.getDouble(ConfPaths.COMBINED_YAWRATE_PENALTY_FACTOR);
|
||||
yawRatePenaltyMin = config.getInt(ConfPaths.COMBINED_YAWRATE_PENALTY_MIN);
|
||||
yawRatePenaltyMax = config.getInt(ConfPaths.COMBINED_YAWRATE_PENALTY_MAX);
|
||||
|
||||
@@ -63,6 +63,8 @@ public class FightConfig extends ACheckConfig {
|
||||
public final double reachSurvivalDistance;
|
||||
public final double reachReduceDistance;
|
||||
public final double reachReduceStep;
|
||||
public final boolean reachImprobableFeedOnly;
|
||||
public final float reachImprobableWeight;
|
||||
|
||||
public final ActionList reachActions;
|
||||
|
||||
@@ -75,6 +77,8 @@ public class FightConfig extends ACheckConfig {
|
||||
|
||||
public final int speedShortTermLimit;
|
||||
public final int speedShortTermTicks;
|
||||
public final boolean speedImprobableFeedOnly;
|
||||
public final float speedImprobableWeight;
|
||||
public final ActionList speedActions;
|
||||
|
||||
public final ActionList wrongTurnActions;
|
||||
@@ -131,6 +135,8 @@ public class FightConfig extends ACheckConfig {
|
||||
reachReduce = config.getBoolean(ConfPaths.FIGHT_REACH_REDUCE);
|
||||
reachReduceDistance = config.getDouble(ConfPaths.FIGHT_REACH_REDUCEDISTANCE, 0, reachSurvivalDistance, 0.9);
|
||||
reachReduceStep = config.getDouble(ConfPaths.FIGHT_REACH_REDUCESTEP, 0, reachReduceDistance, 0.15);
|
||||
reachImprobableFeedOnly = config.getBoolean(ConfPaths.FIGHT_REACH_IMPROBABLE_FEEDONLY);
|
||||
reachImprobableWeight = (float) config.getDouble(ConfPaths.FIGHT_REACH_IMPROBABLE_WEIGHT);
|
||||
reachActions = config.getOptimizedActionList(ConfPaths.FIGHT_REACH_ACTIONS, Permissions.FIGHT_REACH);
|
||||
|
||||
selfHitActions = config.getOptimizedActionList(ConfPaths.FIGHT_SELFHIT_ACTIONS, Permissions.FIGHT_SELFHIT);
|
||||
@@ -141,6 +147,8 @@ public class FightConfig extends ACheckConfig {
|
||||
speedBucketFactor = (float) config.getDouble(ConfPaths.FIGHT_SPEED_BUCKETS_FACTOR, 1f);
|
||||
speedShortTermLimit = config.getInt(ConfPaths.FIGHT_SPEED_SHORTTERM_LIMIT);
|
||||
speedShortTermTicks = config.getInt(ConfPaths.FIGHT_SPEED_SHORTTERM_TICKS);
|
||||
speedImprobableFeedOnly = config.getBoolean(ConfPaths.FIGHT_SPEED_IMPROBABLE_FEEDONLY);
|
||||
speedImprobableWeight = (float) config.getDouble(ConfPaths.FIGHT_SPEED_IMPROBABLE_WEIGHT);
|
||||
speedActions = config.getOptimizedActionList(ConfPaths.FIGHT_SPEED_ACTIONS, Permissions.FIGHT_SPEED);
|
||||
|
||||
wrongTurnActions = config.getOptimizedActionList(ConfPaths.FIGHT_WRONGTURN_ACTIONS,
|
||||
|
||||
@@ -331,19 +331,30 @@ public class FightListener extends CheckListener implements JoinLeaveListener{
|
||||
cancelled = true;
|
||||
// Still feed the improbable.
|
||||
if (data.speedVL > 50) {
|
||||
Improbable.check(player, 2f, now, "fight.speed", pData);
|
||||
if (cc.speedImprobableWeight > 0.0f) {
|
||||
if (!cc.speedImprobableFeedOnly) {
|
||||
Improbable.check(player, cc.speedImprobableWeight, now, "fight.speed", pData);
|
||||
}
|
||||
}
|
||||
// Improbable.check(player, 2f, now, "fight.speed", pData);
|
||||
}
|
||||
else {
|
||||
Improbable.feed(player, 2f, now);
|
||||
if (cc.speedImprobableWeight > 0.0f) {
|
||||
Improbable.feed(player, cc.speedImprobableWeight, now);
|
||||
}
|
||||
}
|
||||
// Improbable.feed(player, 2f, now);
|
||||
}
|
||||
}
|
||||
else if (normalizedMove > 2.0 && Improbable.check(player, 1f, now,
|
||||
"fight.speed", pData)) {
|
||||
else if (normalizedMove > 2.0) { // && Improbable.check(player, 1f, now, "fight.speed", pData)) {
|
||||
if (cc.speedImprobableWeight > 0.0f) {
|
||||
if (!cc.speedImprobableFeedOnly && Improbable.check(player, cc.speedImprobableWeight, now, "fight.speed", pData)) {
|
||||
cancelled = true;
|
||||
}
|
||||
}
|
||||
// Feed improbable in case of ok-moves too.
|
||||
// TODO: consider only feeding if attacking with higher average speed (!)
|
||||
cancelled = true;
|
||||
}
|
||||
}
|
||||
// TODO: Consider to always check improbable (first?). At least if config.always or speed or net.attackfrequency are enabled.
|
||||
|
||||
if (!cancelled && critical.isEnabled(player, pData)
|
||||
@@ -888,7 +899,7 @@ public class FightListener extends CheckListener implements JoinLeaveListener{
|
||||
} else {
|
||||
data.exemptArmSwing = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playerJoins(final Player player) {
|
||||
@@ -918,10 +929,11 @@ public class FightListener extends CheckListener implements JoinLeaveListener{
|
||||
final IPlayerData pData = DataManager.getPlayerData(player);
|
||||
final NetData data = pData.getGenericInstance(NetData.class);
|
||||
final NetConfig cc = pData.getGenericInstance(NetConfig.class);
|
||||
if (!pData.isCheckActive(CheckType.NET_FIGHTSYNC, player)) return;
|
||||
if (data.fightSyncCount >= cc.fightSyncResetCount) {
|
||||
data.fightSyncCount = 0;
|
||||
data.fightSyncReset = 0;
|
||||
data.fightSyncVL *= 0.99D;
|
||||
data.fightSyncVL *= 0.99D;
|
||||
}
|
||||
data.fightSyncReset += 1;
|
||||
Location packet = data.lastHitLocation, eventLoc = player.getLocation();
|
||||
|
||||
@@ -17,7 +17,8 @@ public class FightSync extends Check {
|
||||
|
||||
public boolean check(Player player, IPlayerData pData, NetData data, Location packet, Location eventLoc, final NetConfig cc) {
|
||||
boolean cancel = false;
|
||||
double diff = Math.abs(eventLoc.getYaw() - packet.getYaw()) + Math.abs(eventLoc.getPitch() - packet.getPitch());
|
||||
if (eventLoc != null && packet != null) {
|
||||
double diff = Math.abs(eventLoc.getYaw() - packet.getYaw()) + Math.abs(eventLoc.getPitch() - packet.getPitch());
|
||||
|
||||
if (diff != 0) {
|
||||
if (data.fightSyncCount >= cc.fightSyncThreshold) {
|
||||
@@ -28,6 +29,7 @@ public class FightSync extends Check {
|
||||
data.fightSyncCount += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cancel;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,9 +254,15 @@ public class Reach extends Check {
|
||||
// Execute whatever actions are associated with this check and the violation level and find out if we should
|
||||
// cancel the event.
|
||||
cancel = executeActions(player, data.reachVL, violation, cc.reachActions).willCancel();
|
||||
if (Improbable.check(player, (float) violation / 2f, System.currentTimeMillis(),
|
||||
"fight.reach", pData)){
|
||||
cancel = true;
|
||||
//if (Improbable.check(player, (float) violation / 2f, System.currentTimeMillis(),
|
||||
// "fight.reach", pData)){
|
||||
// cancel = true;
|
||||
//}
|
||||
// TODO: New improbable weight calculations so that weight is not inverse to config weight
|
||||
if (cc.reachImprobableWeight > 0.0f) {
|
||||
if (!cc.reachImprobableFeedOnly && Improbable.check(player, (float) violation / cc.reachImprobableWeight, System.currentTimeMillis(), "fight.reach", pData)) {
|
||||
cancel = true;
|
||||
}
|
||||
}
|
||||
if (cancel && cc.reachPenalty > 0){
|
||||
// Apply an attack penalty time.
|
||||
@@ -269,7 +275,10 @@ public class Reach extends Check {
|
||||
data.attackPenalty.applyPenalty(cc.reachPenalty / 2);
|
||||
}
|
||||
cancel = true;
|
||||
Improbable.feed(player, (float) (lenpRel - context.distanceLimit * data.reachMod) / 4f, System.currentTimeMillis());
|
||||
if (cc.reachImprobableWeight > 0.0f) {
|
||||
Improbable.feed(player, (float) (lenpRel - context.distanceLimit * data.reachMod) / cc.reachImprobableWeight, System.currentTimeMillis());
|
||||
}
|
||||
// Improbable.feed(player, (float) (lenpRel - context.distanceLimit * data.reachMod) / 4f, System.currentTimeMillis());
|
||||
}
|
||||
else{
|
||||
// Player passed the check, reward them.
|
||||
|
||||
@@ -40,7 +40,7 @@ public class WrongTurn extends Check {
|
||||
// Invalid Pitch
|
||||
// TODO: Does invalid pitch arrive here at all?
|
||||
// TODO: Prefer to detect on packet level already.
|
||||
if (Math.abs(pitch) > 90.0f) {
|
||||
if (Math.abs(pitch) > 90.0f || pitch < -90.0f) {
|
||||
data.wrongTurnVL += 1; // (Never cooldown.)
|
||||
if (executeActions(player, data.wrongTurnVL, 1.0, cc.wrongTurnActions).willCancel()) {
|
||||
return true;
|
||||
|
||||
@@ -161,7 +161,10 @@ public class FastClick extends Check {
|
||||
data.fastClickLastCursorAmount = cursorAmount;
|
||||
|
||||
// Feed the improbable.
|
||||
Improbable.feed(player, 0.7f * amount, System.currentTimeMillis());
|
||||
if (cc.fastClickImprobableWeight > 0.0f) {
|
||||
Improbable.feed(player, cc.fastClickImprobableWeight * amount, now);
|
||||
}
|
||||
// Improbable.feed(player, 0.7f * amount, System.currentTimeMillis());
|
||||
|
||||
return cancel;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ public class InventoryConfig extends ACheckConfig {
|
||||
public final float fastClickNormalLimit;
|
||||
public final int chestOpenLimit;
|
||||
public final Set<String> inventoryExemptions = new HashSet<String>();
|
||||
public final float fastClickImprobableWeight;
|
||||
public final ActionList fastClickActions;
|
||||
|
||||
public final long fastConsumeDuration;
|
||||
@@ -64,6 +65,7 @@ public class InventoryConfig extends ACheckConfig {
|
||||
public final boolean openClose;
|
||||
public final boolean openCancelOther;
|
||||
|
||||
public final boolean invMoveDisableCreative;
|
||||
public final ActionList invMoveActionList;
|
||||
|
||||
// Hot fixes.
|
||||
@@ -88,6 +90,7 @@ public class InventoryConfig extends ACheckConfig {
|
||||
fastClickNormalLimit = (float) data.getDouble(ConfPaths.INVENTORY_FASTCLICK_LIMIT_NORMAL);
|
||||
chestOpenLimit = data.getInt(ConfPaths.INVENTORY_FASTCLICK_LIMIT_CHEST);
|
||||
data.readStringlFromList(ConfPaths.INVENTORY_FASTCLICK_EXCLUDE, inventoryExemptions);
|
||||
fastClickImprobableWeight = (float) data.getDouble(ConfPaths.INVENTORY_FASTCLICK_IMPROBABLE_WEIGHT);
|
||||
fastClickActions = data.getOptimizedActionList(ConfPaths.INVENTORY_FASTCLICK_ACTIONS, Permissions.INVENTORY_FASTCLICK);
|
||||
|
||||
fastConsumeDuration = (long) (1000.0 * data.getDouble(ConfPaths.INVENTORY_FASTCONSUME_DURATION));
|
||||
@@ -109,6 +112,7 @@ public class InventoryConfig extends ACheckConfig {
|
||||
openClose = data.getBoolean(ConfPaths.INVENTORY_OPEN_CLOSE);
|
||||
openCancelOther = data.getBoolean(ConfPaths.INVENTORY_OPEN_CANCELOTHER);
|
||||
|
||||
invMoveDisableCreative = data.getBoolean(ConfPaths.INVENTORY_INVENTORYMOVE_DISABLECREATIVE);
|
||||
invMoveActionList = data.getOptimizedActionList(ConfPaths.INVENTORY_INVENTORYMOVE_ACTIONS, Permissions.INVENTORY_MOVE);
|
||||
|
||||
hotFixFallingBlockEndPortalActive = data.getBoolean(ConfPaths.INVENTORY_HOTFIX_DUPE_FALLINGBLOCKENDPORTAL);
|
||||
|
||||
+5
-6
@@ -14,9 +14,6 @@
|
||||
*/
|
||||
package fr.neatmonster.nocheatplus.checks.inventory;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
@@ -38,6 +35,7 @@ import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||
import org.bukkit.event.inventory.InventoryEvent;
|
||||
import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||
import org.bukkit.event.player.PlayerDropItemEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
@@ -49,7 +47,6 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
import org.bukkit.block.Chest;
|
||||
|
||||
import fr.neatmonster.nocheatplus.NCPAPIProvider;
|
||||
import fr.neatmonster.nocheatplus.checks.CheckListener;
|
||||
@@ -286,9 +283,11 @@ public class InventoryListener extends CheckListener implements JoinLeaveListen
|
||||
}
|
||||
|
||||
// Inventory Move check
|
||||
final SlotType type = event.getSlotType();
|
||||
if (invMove.isEnabled(player, pData)) {
|
||||
if (invMove.check(player, data, pData)) {
|
||||
cancel = true;
|
||||
final InventoryConfig cc = pData.getGenericInstance(InventoryConfig.class);
|
||||
if (invMove.check(player, data, pData, cc, type)) {
|
||||
cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-5
@@ -1,6 +1,8 @@
|
||||
package fr.neatmonster.nocheatplus.checks.inventory;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||
|
||||
import fr.neatmonster.nocheatplus.checks.Check;
|
||||
import fr.neatmonster.nocheatplus.checks.CheckType;
|
||||
@@ -15,14 +17,25 @@ public class InventoryMove extends Check {
|
||||
super(CheckType.INVENTORY_MOVE);
|
||||
}
|
||||
|
||||
public boolean check(final Player player, final InventoryData data, final IPlayerData pData) {
|
||||
public boolean check(final Player player, final InventoryData data, final IPlayerData pData, final InventoryConfig cc, final SlotType type) {
|
||||
|
||||
boolean cancel = false;
|
||||
|
||||
if (player.isBlocking() || player.isSprinting() || player.isSneaking() || player.isSwimming()) {
|
||||
if (player.isBlocking() || player.isSprinting() || player.isDead() || player.isSneaking() || player.isSwimming()) {
|
||||
if (player.getGameMode() == GameMode.CREATIVE) {
|
||||
if (!cc.invMoveDisableCreative) {
|
||||
if (type == SlotType.QUICKBAR) {
|
||||
return false;
|
||||
} else {
|
||||
data.invMoveVL += 1D;
|
||||
cancel = executeActions(player, data.invMoveVL, 1D, pData.getGenericInstance(InventoryConfig.class).invMoveActionList).willCancel();
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
data.invMoveVL += 1D;
|
||||
|
||||
cancel = executeActions(player, data.invMoveVL, 1D, pData.getGenericInstance(InventoryConfig.class).invMoveActionList).willCancel();
|
||||
cancel = executeActions(player, data.invMoveVL, 1D, pData.getGenericInstance(InventoryConfig.class).invMoveActionList).willCancel();
|
||||
}
|
||||
}
|
||||
return cancel;
|
||||
}
|
||||
|
||||
@@ -96,12 +96,14 @@ public class MovingData extends ACheckData implements IDataOnRemoveSubCheckData,
|
||||
public double jumpAmplifier = 0;
|
||||
/** Last time the player was actually sprinting. */
|
||||
public long timeSprinting = 0;
|
||||
public long timeRiptiding = 0;
|
||||
public long bedLeaveTime = 0;
|
||||
public long timeRiptiding = 0;
|
||||
public double multSprinting = 1.30000002; // Multiplier at the last time sprinting.
|
||||
/** Compatibility entry for bouncing of slime blocks and the like. */
|
||||
public SimpleEntry verticalBounce = null;
|
||||
/** Last used block change id (BlockChangeTracker). */
|
||||
public final BlockChangeReference blockChangeRef = new BlockChangeReference();
|
||||
public boolean newHDist = false;
|
||||
|
||||
/** Tick at which walk/fly speeds got changed last time. */
|
||||
public int speedTick = 0;
|
||||
|
||||
@@ -306,13 +306,14 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
|
||||
public void onPlayerBedLeave(final PlayerBedLeaveEvent event) {
|
||||
final Player player = event.getPlayer();
|
||||
final IPlayerData pData = DataManager.getPlayerData(player);
|
||||
final MovingData data = pData.getGenericInstance(MovingData.class);
|
||||
data.bedLeaveTime = System.currentTimeMillis();
|
||||
if (pData.isCheckActive(bedLeave.getType(), player)
|
||||
&& bedLeave.checkBed(player, pData)) {
|
||||
final MovingConfig cc = pData.getGenericInstance(MovingConfig.class);
|
||||
// Check if the player has to be reset.
|
||||
// To "cancel" the event, we teleport the player.
|
||||
final Location loc = player.getLocation(useLoc);
|
||||
final MovingData data = pData.getGenericInstance(MovingData.class);
|
||||
Location target = null;
|
||||
final PlayerMoveInfo moveInfo = aux.usePlayerMoveInfo();
|
||||
moveInfo.set(player, loc, null, cc.yOnGround);
|
||||
@@ -723,8 +724,9 @@ public class MovingListener extends CheckListener implements TickListener, IRemo
|
||||
prepareCreativeFlyCheck(player, from, to, moveInfo, thisMove, multiMoveCount, tick, data, cc);
|
||||
}
|
||||
else {
|
||||
checkCf = checkSf = false;
|
||||
// (thisMove.flyCheck stays null.)
|
||||
checkCf = true;
|
||||
checkSf = false;
|
||||
prepareCreativeFlyCheck(player, from, to, moveInfo, thisMove, multiMoveCount, tick, data, cc);
|
||||
}
|
||||
|
||||
// Pre-check checks (hum), either for cf or for sf.
|
||||
|
||||
@@ -49,8 +49,8 @@ public class Magic {
|
||||
public static final double modSneak = 0.13D / WALK_SPEED;
|
||||
// public static final double modSprint = 0.29 / walkSpeed; // TODO: without bunny 0.29 / practical is 0.35
|
||||
public static final double modBlock = 0.16D / WALK_SPEED;
|
||||
public static final double modSwim = 0.3D / WALK_SPEED;
|
||||
public static final double modRiptide = 10.0D;
|
||||
public static final double modSwim = 0.3D / WALK_SPEED; // 0.152D / WALK_SPEED
|
||||
public static final double modRiptide = 10.0D;
|
||||
public static final double modDolphinsGrace = 5.0D; // TODO: Adjust value to be more stricter and closer to actual movement speed, and use different value from in water vs above water
|
||||
public static final double[] modDepthStrider = new double[] {
|
||||
1.0,
|
||||
@@ -59,10 +59,10 @@ public class Magic {
|
||||
1.0 / modSwim, // Results in walkspeed.
|
||||
};
|
||||
public static final double modWeb = 0.105D / WALK_SPEED; // TODO: walkingSpeed * 0.15D; <- does not work
|
||||
public static final double modSoulSand = 0.16D / WALK_SPEED;
|
||||
public static final double modIce = 2.5D; //
|
||||
public static final double modSoulSand = 0.16D / WALK_SPEED;
|
||||
public static final double modIce = 2.5D; //
|
||||
/** Faster moving down stream (water mainly). */
|
||||
public static final double modDownStream = 0.19 / (WALK_SPEED * modSwim);
|
||||
public static final double modDownStream = 0.19 / (WALK_SPEED * modSwim);
|
||||
|
||||
/**
|
||||
* Somewhat arbitrary horizontal speed gain maximum for advance glide phase.
|
||||
@@ -127,7 +127,7 @@ public class Magic {
|
||||
*/
|
||||
public static double swimBaseSpeedV() {
|
||||
// TODO: Does this have to be the dynamic walk speed (refactoring)?
|
||||
return WALK_SPEED * modSwim + 0.1;
|
||||
return WALK_SPEED * modSwim + 0.1; // 0.244
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+52
-27
@@ -75,6 +75,8 @@ public class SurvivalFly extends Check {
|
||||
private static final int bunnyHopMax = 10;
|
||||
/** Divisor vs. last hDist for minimum slow down. */
|
||||
private static final double bunnyDivFriction = 160.0; // Rather in-air, blocks would differ by friction.
|
||||
|
||||
public boolean snowFix;
|
||||
|
||||
|
||||
|
||||
@@ -289,7 +291,17 @@ public class SurvivalFly extends Check {
|
||||
if ((from.getBlockFlags() & BlockProperties.F_ALLOW_LOWJUMP) != 0) {
|
||||
// TODO: Specialize - test for foot region?
|
||||
data.sfNoLowJump = true;
|
||||
}
|
||||
if ((from.getBlockFlags() & BlockProperties.F_GROUND_HEIGHT) != 0) {
|
||||
data.newHDist = true;
|
||||
} else {
|
||||
data.newHDist = false;
|
||||
}
|
||||
if ((from.getBlockFlags() & BlockProperties.F_HEIGHT_8_INC) != 0) {
|
||||
snowFix = true;
|
||||
} else {
|
||||
snowFix = false;
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
// Horizontal move.
|
||||
@@ -403,18 +415,18 @@ public class SurvivalFly extends Check {
|
||||
|
||||
// Detects walking directly above water
|
||||
Material blockUnder = player.getLocation().subtract(0, 0.12, 0).getBlock().getType();
|
||||
Material blockAbove = player.getLocation().add(0, 0.12, 0).getBlock().getType();
|
||||
Material blockAbove = player.getLocation().add(0, 0.10, 0).getBlock().getType();
|
||||
if (blockUnder != null && blockAbove != null) {
|
||||
// Checks if the player is above water but not in water.
|
||||
// Checks if the player is above water but not in water.
|
||||
if (blockUnder == Material.WATER && blockAbove == Material.AIR) {
|
||||
// hDist and vDist checks, simply checks for horizontal movement with little y distance
|
||||
if (hDistanceAboveLimit <= 0D && hDistance > 0.1D && yDistance <= 0.1D && !toOnGround && !fromOnGround
|
||||
&& lastMove.toIsValid && lastMove.yDistance != 0D
|
||||
// hDist and vDist checks, simply checks for horizontal movement with little y distance
|
||||
if (hDistanceAboveLimit <= 0D && hDistance > 0.11D && yDistance <= 0.1D && !toOnGround && !fromOnGround
|
||||
&& lastMove.toIsValid && lastMove.yDistance == yDistance || lastMove.yDistance == yDistance * -1 && lastMove.yDistance != 0D
|
||||
&& !from.isHeadObstructed() && !to.isHeadObstructed() && !player.isSwimming()) {
|
||||
// Prevent being flagged if a player transitions from a block to water and the player falls into the water.
|
||||
if (!(yDistance < 0 && yDistance != 0 && lastMove.yDistance < 0 && lastMove.yDistance != 0)) {
|
||||
hDistanceAboveLimit = Math.max(hDistanceAboveLimit, hDistance);
|
||||
tags.add("watermove");
|
||||
// Prevent being flagged if a player transitions from a block to water and the player falls into the water.
|
||||
if (!(yDistance < 0 && yDistance != 0 && lastMove.yDistance < 0 && lastMove.yDistance != 0)) {
|
||||
hDistanceAboveLimit = Math.max(hDistanceAboveLimit, hDistance);
|
||||
tags.add("watermove");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -918,9 +930,13 @@ public class SurvivalFly extends Check {
|
||||
}
|
||||
}
|
||||
// (Friction is used as is.)
|
||||
} else if (data.newHDist) {
|
||||
hAllowedDistance = 0.345D;
|
||||
|
||||
|
||||
} else if (player.isRiptiding() || (data.timeRiptiding + 3000 > now)) {
|
||||
} else if (snowFix) {
|
||||
hAllowedDistance = 0.377D;
|
||||
}
|
||||
else if (player.isRiptiding() || (data.timeRiptiding + 3000 > now)) {
|
||||
hAllowedDistance = Magic.modRiptide * thisMove.walkSpeed * cc.survivalFlySpeedingSpeed / 100D;
|
||||
}
|
||||
// Allows faster speed for player when swimming above water since from -> to does not seem to detect correctly
|
||||
@@ -1135,9 +1151,15 @@ public class SurvivalFly extends Check {
|
||||
}
|
||||
strictVdistRel = false;
|
||||
} else if (player.isRiptiding() || (data.timeRiptiding + 3000 > now)) {
|
||||
vAllowedDistance = lastMove.yDistance * 5.0D;
|
||||
strictVdistRel = false;
|
||||
}
|
||||
vAllowedDistance = lastMove.yDistance * 5.0D;
|
||||
strictVdistRel = false;
|
||||
} else if (data.bedLeaveTime + 500 > now && yDistance < 0.45) {
|
||||
strictVdistRel = false;
|
||||
vAllowedDistance = yDistance;
|
||||
} else if (snowFix) {
|
||||
strictVdistRel = false;
|
||||
vAllowedDistance = 0.425D;
|
||||
}
|
||||
else if (lastMove.toIsValid) {
|
||||
if (lastMove.yDistance >= -Math.max(Magic.GRAVITY_MAX / 2.0, 1.3 * Math.abs(yDistance)) && lastMove.yDistance <= 0.0
|
||||
&& (lastMove.touchedGround || lastMove.to.extraPropertiesValid && lastMove.to.resetCond)) {
|
||||
@@ -1220,6 +1242,8 @@ public class SurvivalFly extends Check {
|
||||
|
||||
} else if (player.isRiptiding() || (data.timeRiptiding + 3000 > now)) {
|
||||
vDistRelVL = false;
|
||||
} else if (data.bedLeaveTime + 500 > now && yDistance < 0.45) {
|
||||
vDistRelVL = false;
|
||||
}
|
||||
else {
|
||||
// Violation.
|
||||
@@ -1301,6 +1325,8 @@ public class SurvivalFly extends Check {
|
||||
}
|
||||
else if (player.isRiptiding() || (data.timeRiptiding + 3000 > now)) {
|
||||
vDistRelVL = false;
|
||||
} else if (data.bedLeaveTime + 500 > now && yDistance < 0.45) {
|
||||
vDistRelVL = false;
|
||||
}
|
||||
else {
|
||||
// Violation.
|
||||
@@ -1491,9 +1517,8 @@ public class SurvivalFly extends Check {
|
||||
else if (thisMove.verVelUsed == null) { // Only skip if just used.
|
||||
// Here yDistance can be negative and positive.
|
||||
// if (yDistance != 0.0) {
|
||||
if (BlockProperties.isNewLiq(from.getTypeIdBelow())) {
|
||||
|
||||
} else if (data.timeRiptiding + 500 > now) {
|
||||
if ( (BlockProperties.isNewLiq(from.getTypeIdBelow())) || (data.timeRiptiding + 500 > now) || (data.bedLeaveTime + 500 > now && yDistance < 0.45) || (snowFix) ) {
|
||||
// Ignore
|
||||
}
|
||||
else {
|
||||
data.vDistAcc.add((float) yDistance);
|
||||
@@ -1581,16 +1606,12 @@ public class SurvivalFly extends Check {
|
||||
// Moving upwards after falling without having touched the ground.
|
||||
if (data.bunnyhopDelay < 9 && !((lastMove.touchedGround || lastMove.from.onGroundOrResetCond) && lastMove.yDistance == 0D) && data.getOrUseVerticalVelocity(yDistance) == null) {
|
||||
// TODO: adjust limit for bunny-hop.
|
||||
if (BlockProperties.isNewLiq(from.getTypeIdBelow())) {
|
||||
// Exempts player if they are above a 'newliquid' block (1.13 water blocks)
|
||||
// Fixes issue with player swimming above a kelp plant (or related)
|
||||
}
|
||||
else if (data.timeRiptiding + 1000 > now) {
|
||||
|
||||
} else {
|
||||
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, Math.abs(yDistance));
|
||||
if ( (BlockProperties.isNewLiq(from.getTypeIdBelow())) || (data.timeRiptiding + 500 > now) || (data.bedLeaveTime + 500 > now && yDistance < 0.45) || (snowFix) ) {
|
||||
|
||||
} else {
|
||||
vDistanceAboveLimit = Math.max(vDistanceAboveLimit, Math.abs(yDistance));
|
||||
tags.add("ychincfly");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
tags.add("ychincair");
|
||||
@@ -1726,13 +1747,17 @@ public class SurvivalFly extends Check {
|
||||
// Horizontal buffer.
|
||||
// TODO: Consider to confine use to "not in air" and similar.
|
||||
if (hDistanceAboveLimit > 0.0 && data.sfHorizontalBuffer > 0.0) {
|
||||
// Handle buffer only if moving too far.
|
||||
if (snowFix && data.sfHorizontalBuffer == 1) {
|
||||
// Ignore
|
||||
} else {
|
||||
// Handle buffer only if moving too far.
|
||||
// Consume buffer.
|
||||
tags.add("hbufuse");
|
||||
final double amount = Math.min(data.sfHorizontalBuffer, hDistanceAboveLimit);
|
||||
hDistanceAboveLimit -= amount;
|
||||
// Ensure we never end up below zero.
|
||||
data.sfHorizontalBuffer = Math.max(0.0, data.sfHorizontalBuffer - amount);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.isRiptiding() || (data.timeRiptiding + 3000 > now)) {
|
||||
|
||||
@@ -20,6 +20,7 @@ import fr.neatmonster.nocheatplus.actions.ParameterName;
|
||||
import fr.neatmonster.nocheatplus.checks.Check;
|
||||
import fr.neatmonster.nocheatplus.checks.CheckType;
|
||||
import fr.neatmonster.nocheatplus.checks.ViolationData;
|
||||
import fr.neatmonster.nocheatplus.checks.combined.Improbable;
|
||||
import fr.neatmonster.nocheatplus.players.IPlayerData;
|
||||
import fr.neatmonster.nocheatplus.utilities.TickTask;
|
||||
|
||||
@@ -95,7 +96,10 @@ public class AttackFrequency extends Check {
|
||||
cancel = true;
|
||||
}
|
||||
// Feed Improbable.
|
||||
TickTask.requestImprobableUpdate(player.getUniqueId(), 2f);
|
||||
if (cc.attackFrequencyImprobableWeight > 0.0f) {
|
||||
TickTask.requestImprobableUpdate(player.getUniqueId(), cc.attackFrequencyImprobableWeight);
|
||||
}
|
||||
// TickTask.requestImprobableUpdate(player.getUniqueId(), 2f);
|
||||
}
|
||||
|
||||
return cancel;
|
||||
|
||||
@@ -55,6 +55,7 @@ public class NetConfig extends ACheckConfig {
|
||||
public final float attackFrequencyLimitSecondsTwo;
|
||||
public final float attackFrequencyLimitSecondsFour;
|
||||
public final float attackFrequencyLimitSecondsEight;
|
||||
public final float attackFrequencyImprobableWeight;
|
||||
public final ActionList attackFrequencyActions;
|
||||
|
||||
public final int fightSyncResetCount;
|
||||
@@ -92,6 +93,7 @@ public class NetConfig extends ACheckConfig {
|
||||
attackFrequencyLimitSecondsTwo = config.getInt(ConfPaths.NET_ATTACKFREQUENCY_SECONDS_TWO);
|
||||
attackFrequencyLimitSecondsFour= config.getInt(ConfPaths.NET_ATTACKFREQUENCY_SECONDS_FOUR);
|
||||
attackFrequencyLimitSecondsEight = config.getInt(ConfPaths.NET_ATTACKFREQUENCY_SECONDS_EIGHT);
|
||||
attackFrequencyImprobableWeight = (float) config.getDouble(ConfPaths.NET_ATTACKFREQUENCY_IMPROBABLE_WEIGHT);
|
||||
attackFrequencyActions = config.getOptimizedActionList(ConfPaths.NET_ATTACKFREQUENCY_ACTIONS, Permissions.NET_ATTACKFREQUENCY);
|
||||
|
||||
fightSyncResetCount = config.getInt(ConfPaths.NET_FIGHTSYNC_RESETCOUNT);
|
||||
|
||||
@@ -223,6 +223,9 @@ public abstract class ConfPaths {
|
||||
private static final String BLOCKBREAK_WRONGBLOCK = BLOCKBREAK + "wrongblock.";
|
||||
public static final String BLOCKBREAK_WRONGBLOCK_CHECK = BLOCKBREAK_WRONGBLOCK + SUB_ACTIVE;
|
||||
public static final String BLOCKBREAK_WRONGBLOCK_LEVEL = BLOCKBREAK_WRONGBLOCK + "level";
|
||||
private static final String BLOCKBREAK_WRONGBLOCK_IMPROBABLE = BLOCKBREAK_WRONGBLOCK + "improbable.";
|
||||
public static final String BLOCKBREAK_WRONGBLOCK_IMPROBABLE_FEEDONLY = BLOCKBREAK_WRONGBLOCK_IMPROBABLE + "feedonly";
|
||||
public static final String BLOCKBREAK_WRONGBLOCK_IMPROBABLE_WEIGHT = BLOCKBREAK_WRONGBLOCK_IMPROBABLE + "weight";
|
||||
public static final String BLOCKBREAK_WRONGBLOCK_ACTIONS = BLOCKBREAK_WRONGBLOCK + "actions";
|
||||
|
||||
public static final String BLOCKINTERACT = CHECKS + "blockinteract.";
|
||||
@@ -269,6 +272,9 @@ public abstract class ConfPaths {
|
||||
private static final String BLOCKPLACE_FASTPLACE_SHORTTERM = BLOCKPLACE_FASTPLACE + "shortterm.";
|
||||
public static final String BLOCKPLACE_FASTPLACE_SHORTTERM_TICKS = BLOCKPLACE_FASTPLACE_SHORTTERM + "ticks";
|
||||
public static final String BLOCKPLACE_FASTPLACE_SHORTTERM_LIMIT = BLOCKPLACE_FASTPLACE_SHORTTERM + "limit";
|
||||
private static final String BLOCKPLACE_FASTPLACE_IMPROBABLE = BLOCKPLACE_FASTPLACE + "improbable.";
|
||||
public static final String BLOCKPLACE_FASTPLACE_IMPROBABLE_FEEDONLY = BLOCKPLACE_FASTPLACE_IMPROBABLE + "feedonly";
|
||||
public static final String BLOCKPLACE_FASTPLACE_IMPROBABLE_WEIGHT = BLOCKPLACE_FASTPLACE_IMPROBABLE + "weight";
|
||||
public static final String BLOCKPLACE_FASTPLACE_ACTIONS = BLOCKPLACE_FASTPLACE + "actions";
|
||||
|
||||
private static final String BLOCKPLACE_NOSWING = BLOCKPLACE + "noswing.";
|
||||
@@ -287,6 +293,9 @@ public abstract class ConfPaths {
|
||||
private static final String BLOCKPLACE_SPEED = BLOCKPLACE + "speed.";
|
||||
public static final String BLOCKPLACE_SPEED_CHECK = BLOCKPLACE_SPEED + SUB_ACTIVE;
|
||||
public static final String BLOCKPLACE_SPEED_INTERVAL = BLOCKPLACE_SPEED + "interval";
|
||||
private static final String BLOCKPLACE_SPEED_IMPROBABLE = BLOCKPLACE_SPEED + "improbable.";
|
||||
public static final String BLOCKPLACE_SPEED_IMPROBABLE_FEEDONLY = BLOCKPLACE_SPEED_IMPROBABLE + "feedonly";
|
||||
public static final String BLOCKPLACE_SPEED_IMPROBABLE_WEIGHT = BLOCKPLACE_SPEED_IMPROBABLE + "weight";
|
||||
public static final String BLOCKPLACE_SPEED_ACTIONS = BLOCKPLACE_SPEED + "actions";
|
||||
|
||||
private static final String BLOCKPLACE_PREVENTMISC = BLOCKPLACE + "preventmisc.";
|
||||
@@ -450,7 +459,9 @@ public abstract class ConfPaths {
|
||||
|
||||
private static final String COMBINED_YAWRATE = COMBINED + "yawrate.";
|
||||
public static final String COMBINED_YAWRATE_RATE = COMBINED_YAWRATE + "rate";
|
||||
public static final String COMBINED_YAWRATE_IMPROBABLE = COMBINED_YAWRATE + "improbable";
|
||||
private static final String COMBINED_YAWRATE_IMPROBABLE = COMBINED_YAWRATE + "improbable.";
|
||||
public static final String COMBINED_YAWRATE_IMPROBABLE_FEEDONLY = COMBINED_YAWRATE_IMPROBABLE + "feedonly";
|
||||
public static final String COMBINED_YAWRATE_IMPROBABLE_WEIGHT = COMBINED_YAWRATE_IMPROBABLE + "weight";
|
||||
private static final String COMBINED_YAWRATE_PENALTY = COMBINED_YAWRATE + "penalty.";
|
||||
public static final String COMBINED_YAWRATE_PENALTY_FACTOR = COMBINED_YAWRATE_PENALTY + "factor";
|
||||
public static final String COMBINED_YAWRATE_PENALTY_MIN = COMBINED_YAWRATE_PENALTY + "minimum";
|
||||
@@ -509,6 +520,9 @@ public abstract class ConfPaths {
|
||||
public static final String FIGHT_REACH_REDUCE = FIGHT_REACH + "reduce";
|
||||
public static final String FIGHT_REACH_REDUCEDISTANCE = FIGHT_REACH + "reducedistance";
|
||||
public static final String FIGHT_REACH_REDUCESTEP = FIGHT_REACH + "reducestep";
|
||||
private static final String FIGHT_REACH_IMPROBABLE = FIGHT_REACH + "improbable.";
|
||||
public static final String FIGHT_REACH_IMPROBABLE_FEEDONLY = FIGHT_REACH_IMPROBABLE + "feedonly";
|
||||
public static final String FIGHT_REACH_IMPROBABLE_WEIGHT = FIGHT_REACH_IMPROBABLE + "weight";
|
||||
public static final String FIGHT_REACH_ACTIONS = FIGHT_REACH + "actions";
|
||||
|
||||
public static final String FIGHT_SELFHIT = FIGHT + "selfhit.";
|
||||
@@ -528,6 +542,9 @@ public abstract class ConfPaths {
|
||||
private static final String FIGHT_SPEED_SHORTTERM = FIGHT_SPEED + "shortterm.";
|
||||
public static final String FIGHT_SPEED_SHORTTERM_LIMIT = FIGHT_SPEED_SHORTTERM + "limit";
|
||||
public static final String FIGHT_SPEED_SHORTTERM_TICKS = FIGHT_SPEED_SHORTTERM + "ticks";
|
||||
private static final String FIGHT_SPEED_IMPROBABLE = FIGHT_SPEED + "improbable.";
|
||||
public static final String FIGHT_SPEED_IMPROBABLE_FEEDONLY = FIGHT_SPEED_IMPROBABLE + "feedonly";
|
||||
public static final String FIGHT_SPEED_IMPROBABLE_WEIGHT = FIGHT_SPEED_IMPROBABLE + "weight";
|
||||
public static final String FIGHT_SPEED_ACTIONS = FIGHT_SPEED + "actions";
|
||||
|
||||
private static final String FIGHT_WRONGTURN = FIGHT + "wrongturn.";
|
||||
@@ -555,6 +572,8 @@ public abstract class ConfPaths {
|
||||
public static final String INVENTORY_FASTCLICK_LIMIT_SHORTTERM = INVENTORY_FASTCLICK_LIMIT + "shortterm";
|
||||
public static final String INVENTORY_FASTCLICK_LIMIT_NORMAL = INVENTORY_FASTCLICK_LIMIT + "normal";
|
||||
public static final String INVENTORY_FASTCLICK_LIMIT_CHEST = INVENTORY_FASTCLICK_LIMIT + "chest";
|
||||
private static final String INVENTORY_FASTCLICK_IMPROBABLE = INVENTORY_FASTCLICK + "improbable.";
|
||||
public static final String INVENTORY_FASTCLICK_IMPROBABLE_WEIGHT = INVENTORY_FASTCLICK_IMPROBABLE + "weight";
|
||||
public static final String INVENTORY_FASTCLICK_ACTIONS = INVENTORY_FASTCLICK + "actions";
|
||||
|
||||
private static final String INVENTORY_FASTCONSUME = INVENTORY + "fastconsume.";
|
||||
@@ -594,6 +613,7 @@ public abstract class ConfPaths {
|
||||
|
||||
public static final String INVENTORY_INVENTORYMOVE = INVENTORY + "inventorymove.";
|
||||
public static final String INVENTORY_INVENTORYMOVE_CHECK = INVENTORY_INVENTORYMOVE + SUB_ACTIVE;
|
||||
public static final String INVENTORY_INVENTORYMOVE_DISABLECREATIVE = INVENTORY_INVENTORYMOVE + "disable_creative";
|
||||
public static final String INVENTORY_INVENTORYMOVE_ACTIONS = INVENTORY_INVENTORYMOVE + "actions";
|
||||
|
||||
// Inventory hot-fix.
|
||||
@@ -741,6 +761,8 @@ public abstract class ConfPaths {
|
||||
public static final String NET_ATTACKFREQUENCY_SECONDS_TWO = NET_ATTACKFREQUENCY_SECONDS + "two";
|
||||
public static final String NET_ATTACKFREQUENCY_SECONDS_FOUR = NET_ATTACKFREQUENCY_SECONDS + "four";
|
||||
public static final String NET_ATTACKFREQUENCY_SECONDS_EIGHT = NET_ATTACKFREQUENCY_SECONDS + "eight";
|
||||
private static final String NET_ATTACKFREQUENCY_IMPROBABLE = NET_ATTACKFREQUENCY + "improbable.";
|
||||
public static final String NET_ATTACKFREQUENCY_IMPROBABLE_WEIGHT = NET_ATTACKFREQUENCY_IMPROBABLE + "weight";
|
||||
public static final String NET_ATTACKFREQUENCY_ACTIONS = NET_ATTACKFREQUENCY + "actions";
|
||||
|
||||
private static final String NET_FIGHTSYNC = NET + "fightsync.";
|
||||
|
||||
@@ -145,6 +145,8 @@ public class DefaultConfig extends ConfigFile {
|
||||
|
||||
set(ConfPaths.BLOCKBREAK_WRONGBLOCK_CHECK, "default", 785);
|
||||
set(ConfPaths.BLOCKBREAK_WRONGBLOCK_LEVEL, 10, 785);
|
||||
set(ConfPaths.BLOCKBREAK_WRONGBLOCK_IMPROBABLE_FEEDONLY, false, 1154);
|
||||
set(ConfPaths.BLOCKBREAK_WRONGBLOCK_IMPROBABLE_WEIGHT, 2.0, 1154);
|
||||
set(ConfPaths.BLOCKBREAK_WRONGBLOCK_ACTIONS, "cancel vl>10 log:bwrong:0:5:if cancel vl>30 log:bwrong:0:5:cif cancel cmd:kickwb", 785);
|
||||
|
||||
|
||||
@@ -182,6 +184,8 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.BLOCKPLACE_FASTPLACE_LIMIT, 22, 785);
|
||||
set(ConfPaths.BLOCKPLACE_FASTPLACE_SHORTTERM_TICKS, 10, 785);
|
||||
set(ConfPaths.BLOCKPLACE_FASTPLACE_SHORTTERM_LIMIT, 6, 785);
|
||||
set(ConfPaths.BLOCKPLACE_FASTPLACE_IMPROBABLE_FEEDONLY, false, 1154);
|
||||
set(ConfPaths.BLOCKPLACE_FASTPLACE_IMPROBABLE_WEIGHT, 0.5, 1154);
|
||||
set(ConfPaths.BLOCKPLACE_FASTPLACE_ACTIONS, "cancel vl>100 log:fastplace:3:5:cif cancel", 785);
|
||||
|
||||
set(ConfPaths.BLOCKPLACE_REACH_CHECK, "default", 785);
|
||||
@@ -196,6 +200,8 @@ public class DefaultConfig extends ConfigFile {
|
||||
|
||||
set(ConfPaths.BLOCKPLACE_SPEED_CHECK, "default", 785);
|
||||
set(ConfPaths.BLOCKPLACE_SPEED_INTERVAL, 45L, 785);
|
||||
set(ConfPaths.BLOCKPLACE_SPEED_IMPROBABLE_FEEDONLY, false, 1154);
|
||||
set(ConfPaths.BLOCKPLACE_SPEED_IMPROBABLE_WEIGHT, 0.6, 1154);
|
||||
set(ConfPaths.BLOCKPLACE_SPEED_ACTIONS,
|
||||
"cancel vl>150 log:bpspeed:3:5:if cancel vl>1000 log:bpspeed:3:5:cif cancel", 785);
|
||||
|
||||
@@ -317,7 +323,9 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.COMBINED_YAWRATE_PENALTY_FACTOR, 1.0, 785);
|
||||
set(ConfPaths.COMBINED_YAWRATE_PENALTY_MIN, 250, 785);
|
||||
set(ConfPaths.COMBINED_YAWRATE_PENALTY_MAX, 2000, 785);
|
||||
set(ConfPaths.COMBINED_YAWRATE_IMPROBABLE, true, 785);
|
||||
set(ConfPaths.COMBINED_YAWRATE_IMPROBABLE_FEEDONLY, false, 1154);
|
||||
set(ConfPaths.COMBINED_YAWRATE_IMPROBABLE_WEIGHT, 100.0, 1154);
|
||||
// set(ConfPaths.COMBINED_YAWRATE_IMPROBABLE, true, 785);
|
||||
|
||||
// FIGHT
|
||||
set(ConfPaths.FIGHT_ACTIVE, "default", 1144);
|
||||
@@ -364,6 +372,8 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.FIGHT_REACH_REDUCE, true, 785);
|
||||
set(ConfPaths.FIGHT_REACH_REDUCEDISTANCE, 0.9, 785);
|
||||
set(ConfPaths.FIGHT_REACH_REDUCESTEP, 0.15, 785);
|
||||
set(ConfPaths.FIGHT_REACH_IMPROBABLE_FEEDONLY, false, 1154);
|
||||
set(ConfPaths.FIGHT_REACH_IMPROBABLE_WEIGHT, 2.0, 1154);
|
||||
set(ConfPaths.FIGHT_REACH_ACTIONS, "cancel vl>10 log:freach:2:5:if cancel", 785);
|
||||
|
||||
set(ConfPaths.FIGHT_SELFHIT_CHECK, "default", 785);
|
||||
@@ -374,6 +384,8 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.FIGHT_SPEED_ACTIONS, "cancel vl>50 log:fspeed:0:5:if cancel", 785);
|
||||
set(ConfPaths.FIGHT_SPEED_SHORTTERM_TICKS, 7, 785);
|
||||
set(ConfPaths.FIGHT_SPEED_SHORTTERM_LIMIT, 6, 785);
|
||||
set(ConfPaths.FIGHT_SPEED_IMPROBABLE_FEEDONLY, false, 1154);
|
||||
set(ConfPaths.FIGHT_SPEED_IMPROBABLE_WEIGHT, 2.0, 1154);
|
||||
|
||||
set(ConfPaths.FIGHT_WRONGTURN_CHECK, "default", 1143);
|
||||
set(ConfPaths.FIGHT_WRONGTURN_ACTIONS, "cancel cmd:kick_wrongturn log:log_wrongturn:0:15:fci", 1143);
|
||||
@@ -393,6 +405,7 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.INVENTORY_FASTCLICK_LIMIT_SHORTTERM, 4, 785);
|
||||
set(ConfPaths.INVENTORY_FASTCLICK_LIMIT_NORMAL, 15, 785);
|
||||
set(ConfPaths.INVENTORY_FASTCLICK_LIMIT_CHEST, 152, 1154);
|
||||
set(ConfPaths.INVENTORY_FASTCLICK_IMPROBABLE_WEIGHT, 0.7, 1154);
|
||||
set(ConfPaths.INVENTORY_FASTCLICK_ACTIONS, "cancel vl>50 log:fastclick:3:5:cif cancel", 785);
|
||||
|
||||
set(ConfPaths.INVENTORY_INSTANTBOW_CHECK, "default", 785);
|
||||
@@ -412,6 +425,7 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.INVENTORY_FASTCONSUME_ACTIONS, "log:fastconsume:2:5:if cancel", 785);
|
||||
|
||||
set(ConfPaths.INVENTORY_INVENTORYMOVE_CHECK, "default", 1153);
|
||||
set(ConfPaths.INVENTORY_INVENTORYMOVE_DISABLECREATIVE, true, 1153);
|
||||
set(ConfPaths.INVENTORY_INVENTORYMOVE_ACTIONS, "log:inventorymove:2:5:if cancel", 785);
|
||||
|
||||
set(ConfPaths.INVENTORY_GUTENBERG_CHECK, "default", 785);
|
||||
@@ -563,13 +577,15 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.NET_ATTACKFREQUENCY_SECONDS_TWO, 30, 785);
|
||||
set(ConfPaths.NET_ATTACKFREQUENCY_SECONDS_FOUR, 60, 785);
|
||||
set(ConfPaths.NET_ATTACKFREQUENCY_SECONDS_EIGHT, 100, 785);
|
||||
set(ConfPaths.NET_ATTACKFREQUENCY_IMPROBABLE_WEIGHT, 2.0, 1154);
|
||||
set(ConfPaths.NET_ATTACKFREQUENCY_ACTIONS, "cancel vl>30 cancel log:attackfrequency:0:5:if vl>160 cancel log:attackfrequency:0:0:cif cmd:kickattackfrequency", 785);
|
||||
|
||||
// FightSync
|
||||
set(ConfPaths.NET_FIGHTSYNC_ACTIVE, "default", 1154);
|
||||
set(ConfPaths.NET_FIGHTSYNC_THRESHOLD, 5, 1154);
|
||||
set(ConfPaths.NET_FIGHTSYNC_RESETCOUNT, 11, 1154);
|
||||
set(ConfPaths.NET_FIGHTSYNC_ACTIONS, "vl<10 log:fightsync:0:5:if", 1154);
|
||||
set(ConfPaths.NET_FIGHTSYNC_ACTIONS, "vl>10 log:fightsync:0:5:if", 1154);
|
||||
|
||||
// FlyingFrequency
|
||||
set(ConfPaths.NET_FLYINGFREQUENCY_ACTIVE, "default", 785);
|
||||
set(ConfPaths.NET_FLYINGFREQUENCY_SECONDS, 5, 785);
|
||||
@@ -619,7 +635,6 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.STRINGS + ".chatnormal", start + "potentially annoying chat" + end, 785);
|
||||
set(ConfPaths.STRINGS + ".color", start + "sent colored chat message" + end, 785);
|
||||
set(ConfPaths.STRINGS + ".commands", start + "issued too many commands" + end, 785);
|
||||
set(ConfPaths.STRINGS + ".combspeed", start + "performs different actions at very high speed" + end, 785);
|
||||
set(ConfPaths.STRINGS + ".critical", start + "tried to do a critical hit but wasn't technically jumping [tags]" + end, 785);
|
||||
set(ConfPaths.STRINGS + ".drop", start + "tried to drop more items than allowed" + end, 785);
|
||||
set(ConfPaths.STRINGS + ".dropkick", "ncp delay ncp kick [player] Dropping items too fast.", 785);
|
||||
@@ -665,7 +680,6 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.STRINGS + ".kickselfhit", "ncp kick [player] You tried to hit yourself!", 785);
|
||||
set(ConfPaths.STRINGS + ".kickwb", "ncp kick [player] Block breaking out of sync!", 785);
|
||||
set(ConfPaths.STRINGS + ".kick_wrongturn", "ncp kick [player] Wrong turn!", 1143);
|
||||
set(ConfPaths.STRINGS + ".knockback", start + "tried to do a knockback but wasn't technically sprinting" + end, 785);
|
||||
set(ConfPaths.STRINGS + ".log_wrongturn", start + "looked wrongly" + end, 1143);
|
||||
set(ConfPaths.STRINGS + ".morepackets", start + "sent too many moves ([packets] [tags])" + end, 785);
|
||||
set(ConfPaths.STRINGS + ".msgtempdenylogin", "You are temporarily denied to join this server.", 785);
|
||||
|
||||
Reference in new issue
Block a user