mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-21 15:01:29 +01:00
"flying.heightlimit" is now relative to worldheight
This commit is contained in:
parent
e209e52ff4
commit
a358243d6c
@ -550,8 +550,9 @@
|
|||||||
|
|
||||||
flyingheightlimit:
|
flyingheightlimit:
|
||||||
What is the maximum height (in blocks) that a player may reach by
|
What is the maximum height (in blocks) that a player may reach by
|
||||||
flying. Some servers experience lag when players fly very, very high.
|
flying, relative to the max world height he is in. Some servers
|
||||||
This value is how far above the map height a player may fly.
|
experience lag when players fly very, very high. This value is how
|
||||||
|
far above the map height a player may fly.
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
What should happen if a player flies faster/higher than defined here?
|
What should happen if a player flies faster/higher than defined here?
|
||||||
|
@ -42,10 +42,12 @@ public class FlyingCheck extends MovingCheck {
|
|||||||
|
|
||||||
// Before doing anything, do a basic height check to determine if
|
// Before doing anything, do a basic height check to determine if
|
||||||
// players are flying too high
|
// players are flying too high
|
||||||
if(to.y - data.vertFreedom > ccmoving.flyingHeightLimit) {
|
int maxheight = ccmoving.flyingHeightLimit + player.getPlayer().getWorld().getMaxHeight();
|
||||||
|
|
||||||
|
if(to.y - data.vertFreedom > maxheight) {
|
||||||
newToLocation = new PreciseLocation();
|
newToLocation = new PreciseLocation();
|
||||||
newToLocation.set(setBack);
|
newToLocation.set(setBack);
|
||||||
newToLocation.y = ccmoving.flyingHeightLimit - 10;
|
newToLocation.y = maxheight - 10;
|
||||||
return newToLocation;
|
return newToLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public class MovingConfig implements ConfigItem {
|
|||||||
public final boolean morePacketsCheck;
|
public final boolean morePacketsCheck;
|
||||||
public final ActionList morePacketsActions;
|
public final ActionList morePacketsActions;
|
||||||
|
|
||||||
public final double flyingHeightLimit;
|
public final int flyingHeightLimit;
|
||||||
|
|
||||||
public MovingConfig(NoCheatConfiguration data) {
|
public MovingConfig(NoCheatConfiguration data) {
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public class DefaultConfiguration extends NoCheatConfiguration {
|
|||||||
set(ConfPaths.MOVING_RUNFLY_FLYING_ALLOWINCREATIVE, true);
|
set(ConfPaths.MOVING_RUNFLY_FLYING_ALLOWINCREATIVE, true);
|
||||||
set(ConfPaths.MOVING_RUNFLY_FLYING_SPEEDLIMITHORIZONTAL, 60);
|
set(ConfPaths.MOVING_RUNFLY_FLYING_SPEEDLIMITHORIZONTAL, 60);
|
||||||
set(ConfPaths.MOVING_RUNFLY_FLYING_SPEEDLIMITVERTICAL, 100);
|
set(ConfPaths.MOVING_RUNFLY_FLYING_SPEEDLIMITVERTICAL, 100);
|
||||||
set(ConfPaths.MOVING_RUNFLY_FLYING_HEIGHTLIMIT, 250);
|
set(ConfPaths.MOVING_RUNFLY_FLYING_HEIGHTLIMIT, 128);
|
||||||
set(ConfPaths.MOVING_RUNFLY_FLYING_ACTIONS, "log:moveshort:3:5:f cancel vl>100 log:moveshort:0:5:if cancel vl>400 log:movelong:0:5:cif cancel");
|
set(ConfPaths.MOVING_RUNFLY_FLYING_ACTIONS, "log:moveshort:3:5:f cancel vl>100 log:moveshort:0:5:if cancel vl>400 log:movelong:0:5:cif cancel");
|
||||||
|
|
||||||
set(ConfPaths.MOVING_MOREPACKETS_CHECK, true);
|
set(ConfPaths.MOVING_MOREPACKETS_CHECK, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user