Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a6e6a948c | ||
|
|
05213728bf | ||
|
|
f5640d1fbd | ||
|
|
9a0c9188ca | ||
|
|
07e6baf610 | ||
|
|
9c0115a02b | ||
|
|
09c5ef1a6f |
No files matched your search
@@ -1,7 +1,10 @@
|
||||
<h1 align="center">Vulcan Open Source</h1>
|
||||
<h1 align="center">Vulcan Open Source 2.9.7.30</h1>
|
||||
|
||||
https://discord.gg/skidsolutions
|
||||
|
||||
From version 2.9.7.28
|
||||
---
|
||||
Please fork and download this before a DMCA takedown!
|
||||
Please download this before a DMCA takedown!
|
||||
|
||||
<p align="center">
|
||||
<img src="deobf.jpg" height="300" alt="deobf" /> <img src="hack.jpg" height="300" alt="hack" />
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = 'me.frep.vulcan'
|
||||
version = '2.9.7.28'
|
||||
version = '2.9.7.30'
|
||||
|
||||
java {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
@@ -3,6 +3,7 @@ package me.frep.vulcan.spigot.check.impl.player.fastbreak;
|
||||
import me.frep.vulcan.spigot.check.AbstractCheck;
|
||||
import me.frep.vulcan.spigot.check.api.CheckInfo;
|
||||
import me.frep.vulcan.spigot.check.exemption.ExemptType;
|
||||
import me.frep.vulcan.spigot.check.exemption.ExemptionManager;
|
||||
import me.frep.vulcan.spigot.config.VulcanSettings;
|
||||
import me.frep.vulcan.spigot.player.session.PlayerData;
|
||||
import me.frep.vulcan.spigot.world.block.BlockUtils;
|
||||
@@ -12,6 +13,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
@@ -33,31 +35,57 @@ public class FastBreakA extends AbstractCheck {
|
||||
return;
|
||||
if (event instanceof BlockBreakEvent broken)
|
||||
checkBlockBreak(broken);
|
||||
else if (event instanceof PlayerInteractEvent interaction && interaction.getAction() == org.bukkit.event.block.Action.LEFT_CLICK_BLOCK)
|
||||
else if (event instanceof PlayerInteractEvent interaction && interaction.getAction() == Action.LEFT_CLICK_BLOCK)
|
||||
setTimestamp(interaction);
|
||||
}
|
||||
|
||||
private void setTimestamp(PlayerInteractEvent event) {
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
Player player = event.getPlayer();
|
||||
if (player.getGameMode() != GameMode.SURVIVAL)
|
||||
return;
|
||||
Block block = event.getClickedBlock();
|
||||
if (block != null && !BlockUtils.isLiquid(block.getType()))
|
||||
breakCompletionAtMillis = System.currentTimeMillis() + BukkitRegistry.getBlockBreakTime(block, event.getPlayer());
|
||||
if (block == null)
|
||||
return;
|
||||
Material material = block.getType();
|
||||
if (BlockUtils.isLiquid(material) || isExemptMaterial(material) || checkItems(player))
|
||||
return;
|
||||
breakCompletionAtMillis = System.currentTimeMillis() + BukkitRegistry.getBlockBreakTime(block, player);
|
||||
}
|
||||
|
||||
private void checkBlockBreak(BlockBreakEvent event) {
|
||||
if (event.isCancelled() || event.getPlayer().getGameMode() != GameMode.SURVIVAL || isExempt(new ExemptType[] { ExemptType.VEHICLE }) || checkItems(event.getPlayer()))
|
||||
Player player = event.getPlayer();
|
||||
if (event.isCancelled() || player.getGameMode() != GameMode.SURVIVAL || isExempt(new ExemptType[] { ExemptType.VEHICLE }))
|
||||
return;
|
||||
Material material = event.getBlock().getType();
|
||||
if (isExemptMaterial(material) || checkItems(player) || checkState(player))
|
||||
return;
|
||||
double remainingMillis = System.currentTimeMillis() - breakCompletionAtMillis;
|
||||
if (remainingMillis < VulcanSettings.checksPlayerFastbreakAMinDifference)
|
||||
fail("block=" + event.getBlock().getType() + " diff=" + remainingMillis + " tool=" + event.getPlayer().getItemInHand().getType());
|
||||
fail("block=" + material + " diff=" + remainingMillis + " tool=" + player.getItemInHand().getType());
|
||||
else
|
||||
decayBuffer();
|
||||
}
|
||||
|
||||
private boolean checkItems(Player player) {
|
||||
return player.getInventory().getItemInHand().getType().name().contains("COPPER");
|
||||
if (player.getItemInHand().getType().name().contains("COPPER"))
|
||||
return true;
|
||||
return ExemptionManager.isAtLeast1_9() && player.getInventory().getItemInOffHand().getType().name().contains("COPPER");
|
||||
}
|
||||
|
||||
private boolean checkItems2(Material material) {
|
||||
return BlockUtils.isLiquid(material);
|
||||
private boolean checkState(Player player) {
|
||||
if (playerData.getMotionState().isBerserk())
|
||||
return true;
|
||||
if (playerData.getMotionState().isConduitPowerEffect())
|
||||
return true;
|
||||
if (ExemptionManager.isAtLeast1_21_2() && BukkitRegistry.hasEfficiencyAbove(player.getItemInHand(), 5))
|
||||
return true;
|
||||
return ExemptionManager.isAtLeast1_16() && BukkitRegistry.hasHasteEffect(player);
|
||||
}
|
||||
|
||||
private boolean isExemptMaterial(Material material) {
|
||||
String name = material.name();
|
||||
return name.equals("TARGET") || name.equals("WATER_LILY") || name.equals("MANGROVE_ROOTS") || name.equals("CHISELED_BOOKSHELF") || name.equals("FIRE") || name.equals("SULFUR") || name.contains("DOOR") || name.contains("TRAP") || name.contains("INFESTED") || name.contains("CONCRETE") || name.contains("SCULK") || name.contains("MUSHROOM") || name.contains("NOTEBLOCK");
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import me.frep.vulcan.spigot.check.CheckSettingsLoader;
|
||||
import me.frep.vulcan.spigot.check.data.CheckData;
|
||||
@@ -573,8 +575,6 @@ public final class VulcanSettings {
|
||||
|
||||
public static boolean connectionOtherAnticheatSupport;
|
||||
|
||||
public static boolean connectionIgnoreIdsOver0;
|
||||
|
||||
public static boolean settingsDontRegisterGeyser;
|
||||
|
||||
public static boolean settingsTestingStuff;
|
||||
@@ -731,6 +731,10 @@ public final class VulcanSettings {
|
||||
|
||||
public static int connectionMaxSizeAmount;
|
||||
|
||||
public static int connectionMinTransactionId;
|
||||
|
||||
public static int connectionMaxTransactionId;
|
||||
|
||||
public static double checksMovementBoatflyAMaxSpeed;
|
||||
|
||||
public static double checksMovementElytraAMaxSpeed;
|
||||
@@ -773,6 +777,10 @@ public final class VulcanSettings {
|
||||
|
||||
public static double checksMovementEntityspeedAMinDifference;
|
||||
|
||||
private static final int DEFAULT_MIN_TRANSACTION_ID = -32758;
|
||||
|
||||
private static final int DEFAULT_MAX_TRANSACTION_ID = -420;
|
||||
|
||||
private static VulcanConfig vulcanConfig;
|
||||
|
||||
private static File file;
|
||||
@@ -1156,7 +1164,7 @@ public final class VulcanSettings {
|
||||
connectionMaxSizeConsoleAlertMessage = getString("connection.max-size.console-alert-message");
|
||||
connectionMaxSizeKickMessage = getString("connection.max-size.kick-message");
|
||||
connectionOtherAnticheatSupport = getBoolean("connection.other-anticheat-support");
|
||||
connectionIgnoreIdsOver0 = getBoolean("connection.ignore-ids-over-0");
|
||||
loadTransactionIdRange();
|
||||
settingsDontRegisterGeyser = getBoolean("settings.dont-register-geyser");
|
||||
settingsTestingStuff = getBoolean("settings.testing-stuff");
|
||||
cancelHitsEnabledForAllChecks = getBoolean("cancel-hits.enabled-for-all-checks");
|
||||
@@ -1166,6 +1174,35 @@ public final class VulcanSettings {
|
||||
CheckSettingsLoader.loadCheckSettings();
|
||||
}
|
||||
|
||||
private static void loadTransactionIdRange() {
|
||||
int configuredMin = getInt("connection.min-transaction-id", DEFAULT_MIN_TRANSACTION_ID);
|
||||
int configuredMax = getInt("connection.max-transaction-id", DEFAULT_MAX_TRANSACTION_ID);
|
||||
int min = clampTransactionId(configuredMin);
|
||||
int max = clampTransactionId(configuredMax);
|
||||
if (min >= max) {
|
||||
min = DEFAULT_MIN_TRANSACTION_ID;
|
||||
max = DEFAULT_MAX_TRANSACTION_ID;
|
||||
}
|
||||
connectionMinTransactionId = min;
|
||||
connectionMaxTransactionId = max;
|
||||
Logger logger = PluginServices.INSTANCE.getVulcanPlugin().getLogger();
|
||||
if (configuredMin != min || configuredMax != max) {
|
||||
logger.warning("[Vulcan] Corrected transaction ID range from [" + configuredMin + ", " + configuredMax + "] to [" + min + ", " + max + "].");
|
||||
vulcanConfig.set("connection.min-transaction-id", min);
|
||||
vulcanConfig.set("connection.max-transaction-id", max);
|
||||
try {
|
||||
save();
|
||||
} catch (RuntimeException exception) {
|
||||
logger.log(Level.WARNING, "[Vulcan] Could not save the corrected transaction ID range.", exception);
|
||||
}
|
||||
}
|
||||
logger.info("Using transaction ID range [" + min + ", " + max + "].");
|
||||
}
|
||||
|
||||
private static int clampTransactionId(int value) {
|
||||
return Math.max(-32768, Math.min(-1, value));
|
||||
}
|
||||
|
||||
public static boolean getBoolean(String text) {
|
||||
return vulcanConfig.getBoolean(text);
|
||||
}
|
||||
@@ -1178,6 +1215,10 @@ public final class VulcanSettings {
|
||||
return vulcanConfig.getInt(text);
|
||||
}
|
||||
|
||||
public static int getInt(String text, int def) {
|
||||
return vulcanConfig.getInt(text, def);
|
||||
}
|
||||
|
||||
public static double getDouble(String text) {
|
||||
return vulcanConfig.getDouble(text);
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ public class McMmoAbilityListener implements Listener {
|
||||
Player player2 = mcMMOPlayerAbilityActivateEvent.getPlayer();
|
||||
PlayerDataStore playerDataStore = PluginServices.INSTANCE.getPlayerDataStore();
|
||||
PlayerData playerData = playerDataStore.getPlayerData(player2);
|
||||
if (playerData != null && mcMMOPlayerAbilityActivateEvent.getAbility() == SuperAbilityType.BERSERK) {
|
||||
}
|
||||
if (playerData != null && mcMMOPlayerAbilityActivateEvent.getAbility() == SuperAbilityType.BERSERK)
|
||||
playerData.getMotionState().setBerserk(true);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -27,7 +27,7 @@ public class McMmoAbilityListener implements Listener {
|
||||
Player player2 = mcMMOPlayerAbilityDeactivateEvent.getPlayer();
|
||||
PlayerDataStore playerDataStore = PluginServices.INSTANCE.getPlayerDataStore();
|
||||
PlayerData playerData = playerDataStore.getPlayerData(player2);
|
||||
if (playerData != null && mcMMOPlayerAbilityDeactivateEvent.getAbility() == SuperAbilityType.BERSERK) {
|
||||
}
|
||||
if (playerData != null && mcMMOPlayerAbilityDeactivateEvent.getAbility() == SuperAbilityType.BERSERK)
|
||||
playerData.getMotionState().setBerserk(false);
|
||||
}
|
||||
}
|
||||
@@ -71,6 +71,10 @@ public class MotionState {
|
||||
|
||||
private boolean slownessEffect;
|
||||
|
||||
private boolean conduitPowerEffect;
|
||||
|
||||
private boolean berserk;
|
||||
|
||||
private boolean depthStrider;
|
||||
|
||||
private boolean wearingElytra;
|
||||
@@ -822,6 +826,18 @@ public class MotionState {
|
||||
return this.slownessEffect;
|
||||
}
|
||||
|
||||
public boolean isConduitPowerEffect() {
|
||||
return this.conduitPowerEffect;
|
||||
}
|
||||
|
||||
public boolean isBerserk() {
|
||||
return this.berserk;
|
||||
}
|
||||
|
||||
public void setBerserk(boolean berserk2) {
|
||||
this.berserk = berserk2;
|
||||
}
|
||||
|
||||
public boolean isDepthStrider() {
|
||||
return this.depthStrider;
|
||||
}
|
||||
@@ -1247,9 +1263,9 @@ public class MotionState {
|
||||
packetLevitationEffect = false;
|
||||
} else if (effect == PotionTypes.SLOW_FALLING) {
|
||||
slowFallingEffect = false;
|
||||
} else if (effect == PotionTypes.CONDUIT_POWER)
|
||||
;
|
||||
else if (effect == PotionTypes.DOLPHINS_GRACE) {
|
||||
} else if (effect == PotionTypes.CONDUIT_POWER) {
|
||||
conduitPowerEffect = false;
|
||||
} else if (effect == PotionTypes.DOLPHINS_GRACE) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1273,9 +1289,9 @@ public class MotionState {
|
||||
levitationAmplifier = amplifier;
|
||||
} else if (effect == PotionTypes.SLOW_FALLING) {
|
||||
slowFallingEffect = true;
|
||||
} else if (effect == PotionTypes.CONDUIT_POWER)
|
||||
;
|
||||
else if (effect == PotionTypes.DOLPHINS_GRACE) {
|
||||
} else if (effect == PotionTypes.CONDUIT_POWER) {
|
||||
conduitPowerEffect = true;
|
||||
} else if (effect == PotionTypes.DOLPHINS_GRACE) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ConfirmationTracker {
|
||||
|
||||
private final Deque<java.lang.Runnable> tasksForNextConfirmation = new ConcurrentLinkedDeque();
|
||||
|
||||
private short nextConfirmationId = -32348;
|
||||
private short nextConfirmationId;
|
||||
|
||||
private short lastSentConfirmationId = -69;
|
||||
|
||||
@@ -163,8 +163,12 @@ public class ConfirmationTracker {
|
||||
}
|
||||
|
||||
public short generateConfirmationId() {
|
||||
if (++nextConfirmationId > -420)
|
||||
nextConfirmationId = -32348;
|
||||
if (nextConfirmationId < VulcanSettings.connectionMinTransactionId)
|
||||
nextConfirmationId = (short) VulcanSettings.connectionMinTransactionId;
|
||||
else if (nextConfirmationId < VulcanSettings.connectionMaxTransactionId)
|
||||
nextConfirmationId++;
|
||||
else
|
||||
nextConfirmationId = (short) VulcanSettings.connectionMinTransactionId;
|
||||
return nextConfirmationId;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public final class BukkitRegistry {
|
||||
|
||||
private static final Enchantment efficiencyEnchantment;
|
||||
@@ -41,6 +43,21 @@ public final class BukkitRegistry {
|
||||
return (long) (amount * 1000.0);
|
||||
}
|
||||
|
||||
public static boolean hasHasteEffect(Player player) {
|
||||
return hasteEffect != null && player.hasPotionEffect(hasteEffect);
|
||||
}
|
||||
|
||||
public static boolean hasEfficiencyAbove(ItemStack itemStack, int level) {
|
||||
if (efficiencyEnchantment != null && itemStack.getEnchantmentLevel(efficiencyEnchantment) > level)
|
||||
return true;
|
||||
for (Map.Entry<Enchantment, Integer> entry : itemStack.getEnchantments().entrySet()) {
|
||||
String key = entry.getKey().getKey().getKey();
|
||||
if ((key.equals("efficiency") || key.equals("dig_speed")) && entry.getValue() > level)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Enchantment getEfficiencyEnchantment() {
|
||||
Enchantment byName = Enchantment.getByName("EFFICIENCY");
|
||||
return byName != null ? byName : Enchantment.getByName("DIG_SPEED");
|
||||
|
||||
@@ -140,8 +140,12 @@ client-brand-alerts:
|
||||
|
||||
connection:
|
||||
debug-messages: false
|
||||
ignore-ids-over-0: false
|
||||
other-anticheat-support: false
|
||||
other-anticheat-support: true
|
||||
# Max/min transaction id. Don't touch if you don't know what you are doing you will break things. Configure to allow compatability with other
|
||||
# anticheats to not clash with eachother's transactions and keep them in their own ranges. Minimum must be smaller than maximum, it will increment
|
||||
# by one from the minimum towards the maximum and then reset to the minimum when the maximum is reached.
|
||||
min-transaction-id: -32758
|
||||
max-transaction-id: -420
|
||||
invalid:
|
||||
# The player sent a reply for a confirmation packet that we did not send (impossible). Kick the player.
|
||||
# This should never false unless there is a plugin incompatability. No, you cannot disable it and we will not
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: Vulcan
|
||||
version: 2.9.7.28
|
||||
version: 2.9.7.30
|
||||
main: me.frep.vulcan.spigot.VulcanPlugin
|
||||
api-version: 1.13
|
||||
authors: [frep, GladUrBad, Joshb_, Elevated, retrooper]
|
||||
|
||||
Reference in new issue
Block a user