mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fixed projectile check. This should be the last commit trail i'll ever leave.
This commit is contained in:
1 parent
dd3223641e
commit
bd401167b1
1 file changed
+2
-19
@@ -1005,6 +1005,7 @@ public class Backend
|
||||
player.sendMessage(ChatColor.RED + "[AntiCheat] Please stop launching projectiles and wait 10 seconds.");
|
||||
return;
|
||||
}
|
||||
increment(player, projectilesShot, PROJECTILE_MAX);
|
||||
if (!trackingProjectiles.contains(player.getName()))
|
||||
{
|
||||
trackingProjectiles.add(player.getName());
|
||||
@@ -1022,26 +1023,10 @@ public class Backend
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
if (projectileHold.contains(player.getName()) && projectilesShot.get(player.getName()) < PROJECTILE_MAX)
|
||||
if (projectileHold.contains(player.getName()))
|
||||
{
|
||||
projectileHold.remove(player.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
projectilesShot.put(player.getName(), 0);
|
||||
micromanage.getPlugin().getServer().getScheduler().scheduleSyncDelayedTask(micromanage.getPlugin(), new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
if (projectileHold.contains(player.getName()))
|
||||
{
|
||||
projectileHold.remove(player.getName());
|
||||
}
|
||||
}
|
||||
|
||||
}, PROJECTILE_HOLD);
|
||||
}
|
||||
}
|
||||
|
||||
}, PROJECTILE_HOLD);
|
||||
@@ -1050,8 +1035,6 @@ public class Backend
|
||||
}
|
||||
}
|
||||
}, PROJECTILE_TIME);
|
||||
if (!projectilesShot.containsKey(player.getName()))
|
||||
projectilesShot.put(player.getName(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user