39 Commits
Author SHA1 Message Date
CaptainObvious0 dec9f754e6 SurvivalFly - Snow Fixes 2019-04-12 17:25:06 -05:00
CaptainObvious0 063f9fd116 SurvivalFly - newHDist fix 2019-04-12 16:33:14 -05:00
CaptainObvious0 0d652109d2 FightListener - FightSync fix
Checks if the check is active for the player before checking.
2019-04-12 16:16:00 -05:00
CaptainObvious0 ba3348e02e Magic - Revert new swimming speeds
New swimming speeds cause issues with riptiding, this needs to be fixed before swimming speeds are updated.
2019-04-12 16:05:09 -05:00
CaptainObvious0 c06e2b6468 Merge pull request #29 from Lysandr0/patch-1 [Beta]
Allow WrongTurn to detect illegal negative pitch patterns
2019-04-12 11:52:49 -05:00
Lysandr0 cb6113a36e Update WrongTurn.java 2019-04-12 08:25:05 +02:00
Lysandr0 60647d3a03 Update WrongTurn.java 2019-04-10 01:18:42 +02:00
Lysandr0 e853eacb3a Fix a parse error and delete unused strings 2019-04-09 22:27:46 +02:00
Lysandr0 908751e7b6 Allow WrongTurn to detect illegal negative pitch patterns 2019-04-09 22:08:59 +02:00
CaptainObvious0 a0d75fc566 Magic - Swimming magic speeds updated
Magic speeds should now match swimming speeds. Other magic speeds still need to be updated.
2019-04-08 22:10:05 -05:00
CaptainObvious0 7f65bd12e6 FightSync - Add nullcheck 2019-04-08 20:39:11 -05:00
CaptainObvious0 82e8e389c0 MovingData - newHDist variable (1.13 Block fixes) 2019-04-08 20:29:21 -05:00
CaptainObvious0 16b32cb953 SurvivalFly - 1.13 Block Fixes
Fixes issue where sprinting and jumping over long periods of blocks with lower block margins would flag for hspeed.
2019-04-08 20:28:35 -05:00
CaptainObvious0 a6b09f90a1 MovingData - bedLeaveTime data 2019-04-08 19:43:28 -05:00
CaptainObvious0 7b4a48e8a9 MovingListener - bedLeaveTime variable 2019-04-08 19:42:44 -05:00
CaptainObvious0 69463aff6b SurvivalFly - BedLeave false positive 2019-04-08 19:41:36 -05:00
CaptainObvious0 75eaab9da0 MovingListener - Vanilla Fly + Elytra improvements 2019-04-08 19:16:07 -05:00
CaptainObvious0 34cd09a70c SurvivalFly - Watermove fixes 2019-04-08 18:11:53 -05:00
CaptainObvious0 a628b4597c ConfPaths - DisableCreative (InvMove) 2019-04-08 17:46:23 -05:00
CaptainObvious0 94bb30781a DefaultConfig - DisableCreative (InvMove) 2019-04-08 17:45:36 -05:00
CaptainObvious0 c0fbe776f0 InventoryConfig - Disable Creative (InventoryMove) 2019-04-08 17:44:32 -05:00
CaptainObvious0 3d9d66e199 InventoryMove - Fixes & Config additions 2019-04-08 17:43:41 -05:00
CaptainObvious0 c58ab8e676 InventoryListener - Fixes + Config additions 2019-04-08 17:42:52 -05:00
CaptainObvious0 a2562d1e6e Update issue templates 2019-04-07 19:47:19 -05:00
CaptainObvious0 a6f1119db0 AttackFrequency - Improbable Weight 2019-04-07 19:25:48 -05:00
CaptainObvious0 cf8be9da54 NetConfig - Improbable Weight 2019-04-07 19:25:20 -05:00
CaptainObvious0 13d14b1fc6 FastClick - Improbable Weight 2019-04-07 19:23:49 -05:00
CaptainObvious0 bdf2fc950a InventoryConfig - Improbable Weight 2019-04-07 19:22:22 -05:00
CaptainObvious0 c69b6f8e8b Reach - Improbable Weight 2019-04-07 19:21:22 -05:00
CaptainObvious0 af429a1740 FightListener - Improbable Weight 2019-04-07 19:20:45 -05:00
CaptainObvious0 d45afcf169 FightConfig - Improbable weight 2019-04-07 19:19:33 -05:00
CaptainObvious0 c5e1b47a97 Combined - Improbable weight 2019-04-07 19:18:48 -05:00
CaptainObvious0 9c2c0a5326 CombinedConfig - Improbable Weight 2019-04-07 19:17:59 -05:00
CaptainObvious0 ae34de5ba1 WrongBlock - Improbable weight 2019-04-07 19:17:20 -05:00
CaptainObvious0 3afbbaea79 BlockBreakConfig - Improbable Weight 2019-04-07 19:16:27 -05:00
CaptainObvious0 243dac7aed BlockPlaceListener - Improbable Weight 2019-04-07 19:15:19 -05:00
CaptainObvious0 266a15c4bf BlockPlaceConfig - Improbable Weight 2019-04-07 19:12:42 -05:00
CaptainObvious0 70d58208cc DefaultConfig - Add improbable weights 2019-04-07 19:11:42 -05:00
CaptainObvious0 755514d4c5 ConfPaths - Add improbable weight to each check 2019-04-07 19:07:18 -05:00
24 changed files with 238 additions and 87 deletions

No files matched your search

@@ -2,7 +2,7 @@
name: Feature/Check Request
about: 'Suggest a feature or check '
title: ''
labels: ''
labels: enhancement
assignees: ''
---
@@ -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;
}
}
}
}
@@ -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);
@@ -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;
}
@@ -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);
@@ -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;
}
}
@@ -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
}
/**
@@ -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);