Fixed CCM in AntiHack
This commit is contained in:
parent
e7cf4eb51d
commit
0540168af7
@ -297,8 +297,10 @@ public class AntiHack extends MiniPlugin
|
|||||||
|
|
||||||
synchronized (_antiHackLock)
|
synchronized (_antiHackLock)
|
||||||
{
|
{
|
||||||
for (Player player : _offense.keySet())
|
for (Iterator<Player> playerIterator = _offense.keySet().iterator(); playerIterator.hasNext();)
|
||||||
{
|
{
|
||||||
|
Player player = playerIterator.next();
|
||||||
|
|
||||||
String out = "";
|
String out = "";
|
||||||
int total = 0;
|
int total = 0;
|
||||||
|
|
||||||
@ -332,6 +334,9 @@ public class AntiHack extends MiniPlugin
|
|||||||
|
|
||||||
//Send Report
|
//Send Report
|
||||||
sendReport(player, out, severity);
|
sendReport(player, out, severity);
|
||||||
|
|
||||||
|
if (severity.equalsIgnoreCase("Extreme"))
|
||||||
|
playerIterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -340,7 +345,7 @@ public class AntiHack extends MiniPlugin
|
|||||||
{
|
{
|
||||||
if (severity.equals("Extreme"))
|
if (severity.equals("Extreme"))
|
||||||
{
|
{
|
||||||
ResetAll(player);
|
ResetAll(player, false);
|
||||||
|
|
||||||
//Staff
|
//Staff
|
||||||
boolean handled = false;
|
boolean handled = false;
|
||||||
@ -416,6 +421,11 @@ public class AntiHack extends MiniPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void ResetAll(Player player)
|
private void ResetAll(Player player)
|
||||||
|
{
|
||||||
|
ResetAll(player, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ResetAll(Player player, boolean removeOffenses)
|
||||||
{
|
{
|
||||||
synchronized (_antiHackLock)
|
synchronized (_antiHackLock)
|
||||||
{
|
{
|
||||||
@ -423,8 +433,8 @@ public class AntiHack extends MiniPlugin
|
|||||||
_velocityEvent.remove(player);
|
_velocityEvent.remove(player);
|
||||||
_lastMoveEvent.remove(player);
|
_lastMoveEvent.remove(player);
|
||||||
|
|
||||||
|
if (removeOffenses)
|
||||||
_offense.remove(player);
|
_offense.remove(player);
|
||||||
|
|
||||||
for (Detector detector : _movementDetectors)
|
for (Detector detector : _movementDetectors)
|
||||||
detector.Reset(player);
|
detector.Reset(player);
|
||||||
|
Loading…
Reference in New Issue
Block a user