mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 03:02:11 +01:00
Final changes to moving-check + version bump
This commit is contained in:
parent
ad9d14dee1
commit
5df7af20b3
@ -3,7 +3,7 @@ name: NoCheatPlugin
|
||||
author: Evenprime
|
||||
|
||||
main: cc.co.evenprime.bukkit.nocheat.NoCheatPlugin
|
||||
version: 0.6.4c
|
||||
version: 0.6.5
|
||||
|
||||
commands:
|
||||
nocheat:
|
||||
|
@ -453,19 +453,27 @@ public class MovingCheck {
|
||||
return d > (double)i ? i : i - 1;
|
||||
}
|
||||
|
||||
public static int lowerBorder(double d1) {
|
||||
public static int lowerBorder(double d1) {
|
||||
double floor = Math.floor(d1);
|
||||
double d4 = (d1 - floor) - magic;
|
||||
//System.out.println(d4);
|
||||
return (int) (floor + d4);
|
||||
double d4 = floor + magic;
|
||||
|
||||
if(d4 <= d1)
|
||||
d4 = 0;
|
||||
else
|
||||
d4 = 1;
|
||||
|
||||
return (int) (floor - d4);
|
||||
}
|
||||
|
||||
public static int upperBorder(double d1) {
|
||||
double floor = Math.floor(d1);
|
||||
double d4 = (d1 - floor) - magic2;
|
||||
//System.out.println(d4);
|
||||
int tmp = (int) (floor - d4);
|
||||
double d4 = floor + magic2;
|
||||
|
||||
return tmp < floor ? tmp + 2 : (int)floor ;
|
||||
if(d4 < d1)
|
||||
d4 = -1;
|
||||
else
|
||||
d4 = 0;
|
||||
|
||||
return (int) (floor - d4);
|
||||
}
|
||||
}
|
||||
|
@ -13,9 +13,7 @@ public class NoCheatEntityListener extends EntityListener {
|
||||
@Override
|
||||
public void onEntityDamage(EntityDamageEvent event) {
|
||||
|
||||
|
||||
if(event.getEntity() instanceof Player) {
|
||||
|
||||
Player p = (Player)event.getEntity();
|
||||
|
||||
NoCheatPlugin.getPlayerData(p).movingJumpPhase = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user