mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fix #226 - soulsand with speed potion
This commit is contained in:
1 parent
d2d72f0736
commit
88e9ef6269
4 files changed
+10
No files matched your search
@@ -302,6 +302,9 @@ public class Backend {
|
||||
if (player.isSprinting()) {
|
||||
reason = "on soulsand while sprinting ";
|
||||
max = magic.XZ_SPEED_MAX_SOULSAND_SPRINT;
|
||||
} else if (player.hasPotionEffect(PotionEffectType.SPEED)) {
|
||||
reason = "on soulsand with speed potion ";
|
||||
max = magic.XZ_SPEED_MAX_SOULSAND_POTION;
|
||||
} else {
|
||||
reason = "on soulsand ";
|
||||
max = magic.XZ_SPEED_MAX_SOULSAND;
|
||||
|
||||
@@ -25,6 +25,7 @@ import net.h31ix.anticheat.util.Utilities;
|
||||
import net.h31ix.anticheat.util.rule.Rule;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@@ -317,6 +317,10 @@ public class Magic {
|
||||
* Maximum speed a player can travel forwards or backwards on soul sand while sprinting; Type=double, +Leniency=Increase.
|
||||
*/
|
||||
public final double XZ_SPEED_MAX_SOULSAND_SPRINT;
|
||||
/**
|
||||
* Maximum speed a player can travel forwards or backwards on soul sand while under the influence; Type=double, +Leniency=Increase.
|
||||
*/
|
||||
public final double XZ_SPEED_MAX_SOULSAND_POTION;
|
||||
/**
|
||||
* Maximum times a player can fail the speed check before action is taken; Type=integer, +Leniency=Increase.
|
||||
*/
|
||||
@@ -424,6 +428,7 @@ public class Magic {
|
||||
XZ_SPEED_MAX_WATER = getDouble("XZ_SPEED_MAX_WATER");
|
||||
XZ_SPEED_MAX_SOULSAND = getDouble("XZ_SPEED_MAX_SOULSAND");
|
||||
XZ_SPEED_MAX_SOULSAND_SPRINT = getDouble("XZ_SPEED_MAX_SOULSAND_SPRINT");
|
||||
XZ_SPEED_MAX_SOULSAND_POTION = getDouble("XZ_SPEED_MAX_SOULSAND_POTION");
|
||||
XZ_SPEED_MAX_WATER_SPRINT = getDouble("XZ_SPEED_MAX_WATER_SPRINT");
|
||||
SPEED_MAX = getInt("SPEED_MAX");
|
||||
INVENTORY_CHECK = getInt("INVENTORY_CHECK");
|
||||
|
||||
Reference in new issue
Block a user