minor bug with speedhack message fixed

This commit is contained in:
Evenprime 2011-02-28 17:10:12 +01:00
parent ea414167e0
commit 2bca8f5ead
3 changed files with 7 additions and 5 deletions

View File

@ -3,5 +3,5 @@ name: NoCheatPlugin
author: Evenprime
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
version: 0.5.9a
version: 0.6

View File

@ -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();
}
}

View File

@ -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++;
}