mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-01-17 21:11:26 +01:00
Check against GameMode.CREATIVE in general.
This commit is contained in:
parent
13c4d654db
commit
5bceb353b7
@ -52,7 +52,7 @@ public class Reach extends Check {
|
||||
|
||||
boolean cancel = false;
|
||||
|
||||
final double distanceLimit = player.getGameMode() == GameMode.SURVIVAL ? SURVIVAL_DISTANCE : CREATIVE_DISTANCE;
|
||||
final double distanceLimit = player.getGameMode() == GameMode.CREATIVE ? CREATIVE_DISTANCE : SURVIVAL_DISTANCE;
|
||||
|
||||
// Distance is calculated from eye location to center of targeted block. If the player is further away from his
|
||||
// target than allowed, the difference will be assigned to "distance".
|
||||
|
@ -53,7 +53,7 @@ public class Reach extends Check {
|
||||
|
||||
boolean cancel = false;
|
||||
|
||||
final double distanceLimit = player.getGameMode() == GameMode.SURVIVAL ? SURVIVAL_DISTANCE : CREATIVE_DISTANCE;
|
||||
final double distanceLimit = player.getGameMode() == GameMode.CREATIVE ? CREATIVE_DISTANCE : SURVIVAL_DISTANCE;
|
||||
|
||||
// Distance is calculated from eye location to center of targeted block. If the player is further away from his
|
||||
// target than allowed, the difference will be assigned to "distance".
|
||||
|
@ -54,7 +54,7 @@ public class Reach extends Check {
|
||||
|
||||
boolean cancel = false;
|
||||
|
||||
final double distanceLimit = player.getGameMode() == GameMode.SURVIVAL ? SURVIVAL_DISTANCE : CREATIVE_DISTANCE;
|
||||
final double distanceLimit = player.getGameMode() == GameMode.CREATIVE ? CREATIVE_DISTANCE : SURVIVAL_DISTANCE;
|
||||
|
||||
// Distance is calculated from eye location to center of targeted block. If the player is further away from his
|
||||
// target than allowed, the difference will be assigned to "distance".
|
||||
|
@ -56,7 +56,7 @@ public class Reach extends Check {
|
||||
|
||||
boolean cancel = false;
|
||||
|
||||
final double distanceLimit = player.getGameMode() == GameMode.SURVIVAL ? SURVIVAL_DISTANCE : CREATIVE_DISTANCE;
|
||||
final double distanceLimit = player.getGameMode() == GameMode.CREATIVE ? CREATIVE_DISTANCE : SURVIVAL_DISTANCE;
|
||||
|
||||
// Reference locations to check distance for.
|
||||
// TODO: improve reference location: depending on height difference choose min(foot/hitbox, attacker)
|
||||
|
Loading…
Reference in New Issue
Block a user