mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-02-11 01:01:58 +01:00
Set minimum "freemoves" to 1 and made neccessary codechanges to
support that.
This commit is contained in:
parent
d05bd2be04
commit
c4cbff5bef
@ -3,7 +3,7 @@ name: NoCheatPlugin
|
|||||||
author: Evenprime
|
author: Evenprime
|
||||||
|
|
||||||
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
||||||
version: 0.6.7a
|
version: 0.6.7b
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
nocheat:
|
nocheat:
|
||||||
|
@ -119,6 +119,9 @@ public class NoCheatConfiguration {
|
|||||||
|
|
||||||
airbuildAction = c.getString("airbuild.action", "logmed deny");
|
airbuildAction = c.getString("airbuild.action", "logmed deny");
|
||||||
|
|
||||||
|
// 1 is minimum. This is needed to smooth over some minecraft bugs like
|
||||||
|
// when a minecart gets broken while a player is inside it (which causes the player to "move"
|
||||||
|
// up 1.0D which is much more than a usual jump would allow in 1 event
|
||||||
if(movingFreeMoves < 1) movingFreeMoves = 1;
|
if(movingFreeMoves < 1) movingFreeMoves = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,6 +178,7 @@ public class NoCheatConfiguration {
|
|||||||
w.write(" high: loghigh reset"); w.newLine();
|
w.write(" high: loghigh reset"); w.newLine();
|
||||||
w.write("# Moving specific optionse") ;w.newLine();
|
w.write("# Moving specific optionse") ;w.newLine();
|
||||||
w.write("moving:"); w.newLine();
|
w.write("moving:"); w.newLine();
|
||||||
|
w.write("# After how many minor violations should the plugin react (minimum 1)"); w.newLine();
|
||||||
w.write(" freemoves: 5"); w.newLine();
|
w.write(" freemoves: 5"); w.newLine();
|
||||||
w.write("# Moving Action, one or more of 'loglow logmed loghigh reset'"); w.newLine();
|
w.write("# Moving Action, one or more of 'loglow logmed loghigh reset'"); w.newLine();
|
||||||
w.write(" action:"); w.newLine();
|
w.write(" action:"); w.newLine();
|
||||||
|
@ -290,17 +290,17 @@ public class MovingCheck {
|
|||||||
actions = NoCheatConfiguration.movingActionMinor;
|
actions = NoCheatConfiguration.movingActionMinor;
|
||||||
|
|
||||||
// React only after the freebee illegal moves have all been used
|
// React only after the freebee illegal moves have all been used
|
||||||
if(data.movingMinorViolationsInARow % (NoCheatConfiguration.movingFreeMoves) != 0) {
|
if(data.movingMinorViolationsInARow <= NoCheatConfiguration.movingFreeMoves) {
|
||||||
vl = null;
|
vl = null;
|
||||||
actions = null;
|
actions = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.movingMinorViolationsInARow != NoCheatConfiguration.movingFreeMoves) {
|
if(data.movingMinorViolationsInARow > NoCheatConfiguration.movingFreeMoves+1) {
|
||||||
log = false;
|
log = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// using up all free moves 4 times in a row counts as one normal violation
|
// after a set number of minor violations a normal violation gets thrown
|
||||||
if(data.movingMinorViolationsInARow % (NoCheatConfiguration.movingFreeMoves * 4) == 0) {
|
if(data.movingMinorViolationsInARow % 40 == 0) {
|
||||||
vl = Level.WARNING;
|
vl = Level.WARNING;
|
||||||
log = true;
|
log = true;
|
||||||
}
|
}
|
||||||
@ -361,7 +361,7 @@ public class MovingCheck {
|
|||||||
NoCheatPlugin.logAction(NoCheatConfiguration.movingActionNormal, "Moving violation ended: "+event.getPlayer().getName()+ " total Events: "+ data.movingNormalViolationsInARow);
|
NoCheatPlugin.logAction(NoCheatConfiguration.movingActionNormal, "Moving violation ended: "+event.getPlayer().getName()+ " total Events: "+ data.movingNormalViolationsInARow);
|
||||||
data.movingNormalViolationsInARow = 0;
|
data.movingNormalViolationsInARow = 0;
|
||||||
}
|
}
|
||||||
if(data.movingMinorViolationsInARow > NoCheatConfiguration.movingFreeMoves) {
|
if(data.movingMinorViolationsInARow > NoCheatConfiguration.movingFreeMoves +1) {
|
||||||
NoCheatPlugin.logAction(NoCheatConfiguration.movingActionMinor, "Moving violation ended: "+event.getPlayer().getName()+ " total Events: "+ data.movingMinorViolationsInARow);
|
NoCheatPlugin.logAction(NoCheatConfiguration.movingActionMinor, "Moving violation ended: "+event.getPlayer().getName()+ " total Events: "+ data.movingMinorViolationsInARow);
|
||||||
data.movingMinorViolationsInARow = 0;
|
data.movingMinorViolationsInARow = 0;
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,5 @@ public class NoCheatEntityListener extends EntityListener {
|
|||||||
|
|
||||||
NoCheatPlugin.getPlayerData(p).movingJumpPhase = 0;
|
NoCheatPlugin.getPlayerData(p).movingJumpPhase = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user