mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fix for issue #6 - projectile launch bug
This commit is contained in:
1 parent
31be5a1b8e
commit
79a88c9de2
4 files changed
+2
-25
No files matched your search
@@ -38,7 +38,7 @@ public class BlockListener extends EventListener
|
||||
private final CheckManager checkManager = getCheckManager();
|
||||
private final Anticheat plugin = getPlugin();
|
||||
private final Configuration config = Anticheat.getManager().getConfiguration();
|
||||
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void onBlockDamage(BlockDamageEvent event)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
package net.h31ix.anticheat.event;
|
||||
|
||||
import net.h31ix.anticheat.manage.CheckType;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -69,21 +69,12 @@ public class PlayerListener extends EventListener
|
||||
|
||||
if (event.getEntity() instanceof Arrow)
|
||||
{
|
||||
// TF2 Heavy does not approve of this action. He yells "NO!"
|
||||
return;
|
||||
}
|
||||
|
||||
if (checkManager.willCheck(player, CheckType.FAST_PROJECTILE))
|
||||
{
|
||||
if (backend.justLaunched(player))
|
||||
{
|
||||
event.setCancelled(!config.silentMode());
|
||||
log("tried to fire projectiles too fast", player, CheckType.FAST_PROJECTILE);
|
||||
}
|
||||
else
|
||||
{
|
||||
backend.logProjectile(player, this);
|
||||
}
|
||||
backend.logProjectile(player, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.h31ix.anticheat.Anticheat;
|
||||
import net.h31ix.anticheat.event.EventListener;
|
||||
import net.h31ix.anticheat.util.Distance;
|
||||
import net.h31ix.anticheat.util.Utilities;
|
||||
@@ -1023,17 +1021,6 @@ public class Backend
|
||||
return animated.containsKey(player.getName());
|
||||
}
|
||||
|
||||
public boolean justLaunched(Player player)
|
||||
{
|
||||
if (projectileHold.contains(player.getName()))
|
||||
{
|
||||
increment(player, projectilesShot, PROJECTILE_MAX);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void logProjectile(final Player player, final EventListener e)
|
||||
{
|
||||
if (projectileHold.contains(player.getName()))
|
||||
|
||||
Reference in new issue
Block a user