Fix for issue #6 - projectile launch bug

This commit is contained in:
H31IX committed 2012-07-09 00:51:05 -04:00
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);
}
}
}