mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 02:48:04 +01:00
minor bug with speedhack message fixed
This commit is contained in:
parent
ea414167e0
commit
2bca8f5ead
@ -3,5 +3,5 @@ name: NoCheatPlugin
|
||||
author: Evenprime
|
||||
|
||||
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
||||
version: 0.5.9a
|
||||
version: 0.6
|
||||
|
||||
|
@ -25,7 +25,7 @@ public class DupePrevention {
|
||||
for(ItemStack drop : drops) {
|
||||
for(int i = 0; i < playerInventory.getSize(); i++) {
|
||||
if(playerInventory.getItem(i).equals(drop)) {
|
||||
p.getInventory().clear(i);
|
||||
playerInventory.clear(i);
|
||||
i = playerInventory.getSize();
|
||||
}
|
||||
}
|
||||
|
@ -48,9 +48,7 @@ public class SpeedhackCheck {
|
||||
else if(data.speedhackEventsSinceLastCheck > limitMed) vl = NORMAL;
|
||||
else if(data.speedhackEventsSinceLastCheck > limitLow) vl = MINOR;
|
||||
|
||||
// Reset values for next check
|
||||
data.speedhackEventsSinceLastCheck = 0;
|
||||
data.speedhackLastCheck = time;
|
||||
|
||||
|
||||
if(vl > NONE) data.speedhackViolationsInARow++;
|
||||
else data.speedhackViolationsInARow = 0;
|
||||
@ -64,6 +62,10 @@ public class SpeedhackCheck {
|
||||
}
|
||||
}
|
||||
|
||||
// Reset values for next check
|
||||
data.speedhackEventsSinceLastCheck = 0;
|
||||
data.speedhackLastCheck = time;
|
||||
|
||||
}
|
||||
data.speedhackEventsSinceLastCheck++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user