diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/BlockBreakListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/BlockBreakListener.java index f905f25c..f5dea9dc 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/BlockBreakListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/BlockBreakListener.java @@ -168,7 +168,7 @@ public class BlockBreakListener extends CheckListener { /** * We listen to PlayerAnimation events because it is (currently) equivalent to "player swings arm" and we want to - * check if he did that between block breaks. + * check if they did that between block breaks. * * @param event * the event diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/Direction.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/Direction.java index b5d63740..30595128 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/Direction.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/Direction.java @@ -19,7 +19,7 @@ import fr.neatmonster.nocheatplus.utilities.TrigUtil; * MMMMMMMMMMM */ /** - * The Direction check will find out if a player tried to interact with something that's not in his field of view. + * The Direction check will find out if a player tried to interact with something that's not in their field of view. */ public class Direction extends Check { @@ -43,14 +43,14 @@ public class Direction extends Check { boolean cancel = false; - // How far "off" is the player with his aim. We calculate from the players eye location and view direction to + // How far "off" is the player with their aim. We calculate from the players eye location and view direction to // the center of the target block. If the line of sight is more too far off, "off" will be bigger than 0. final Location loc = player.getLocation(); final Vector direction = loc.getDirection(); final double off = TrigUtil.directionCheck(loc, player.getEyeHeight(), direction, block, TrigUtil.DIRECTION_PRECISION); if (off > 0.1D) { - // Player failed the check. Let's try to guess how far he was from looking directly to the block... + // Player failed the check. Let's try to guess how far they were from looking directly to the block... final Vector blockEyes = new Vector(0.5 + block.getX() - loc.getX(), 0.5 + block.getY() - loc.getY() - player.getEyeHeight(), 0.5 + block.getZ() - loc.getZ()); final double distance = blockEyes.crossProduct(direction).length() / direction.length(); @@ -62,7 +62,7 @@ public class Direction extends Check { cancel = executeActions(player, data.directionVL, distance, BlockBreakConfig.getConfig(player).directionActions); } else - // Player did likely nothing wrong, reduce violation counter to reward him. + // Player did likely nothing wrong, reduce violation counter to reward them. data.directionVL *= 0.9D; return cancel; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/NoSwing.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/NoSwing.java index c1bc1656..56c3ecbd 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/NoSwing.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/NoSwing.java @@ -16,7 +16,7 @@ import fr.neatmonster.nocheatplus.checks.CheckType; * d8888P */ /** - * We require that the player moves his arm between block breaks, this is what gets checked here. + * We require that the player moves their arm between block breaks, this is what gets checked here. */ public class NoSwing extends Check { @@ -38,14 +38,14 @@ public class NoSwing extends Check { boolean cancel = false; - // Did he swing his arm before? + // Did they swing their arm before? if (data.noSwingArmSwung) { // "Consume" the flag. data.noSwingArmSwung = false; // Reward with lowering of the violation level. data.noSwingVL *= 0.9D; } else { - // He failed, increase violation level. + // They failed, increase violation level. data.noSwingVL += 1D; // Execute whatever actions are associated with this check and the violation level and find out if we should diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/Reach.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/Reach.java index 4c435c50..71e04aa5 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/Reach.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockbreak/Reach.java @@ -54,12 +54,12 @@ public class Reach extends Check { 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 + // Distance is calculated from eye location to center of targeted block. If the player is further away from their // target than allowed, the difference will be assigned to "distance". final double distance = TrigUtil.distance(player.getEyeLocation(), block) - distanceLimit; if (distance > 0) { - // He failed, increment violation level. + // They failed, increment violation level. data.reachVL += distance; // Remember how much further than allowed he tried to reach for logging, if necessary. @@ -69,7 +69,7 @@ public class Reach extends Check { // cancel the event. cancel = executeActions(player, data.reachVL, distance, BlockBreakConfig.getConfig(player).reachActions); } else{ - // Player passed the check, reward him. + // Player passed the check, reward them. data.reachVL *= 0.9D; } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Direction.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Direction.java index 6b4b3f43..a8b94d0c 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Direction.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Direction.java @@ -19,7 +19,7 @@ import fr.neatmonster.nocheatplus.utilities.TrigUtil; * MMMMMMMMMMM */ /** - * The Direction check will find out if a player tried to interact with something that's not in his field of view. + * The Direction check will find out if a player tried to interact with something that's not in their field of view. */ public class Direction extends Check { @@ -43,13 +43,13 @@ public class Direction extends Check { boolean cancel = false; - // How far "off" is the player with his aim. We calculate from the players eye location and view direction to + // How far "off" is the player with their aim. We calculate from the players eye location and view direction to // the center of the target block. If the line of sight is more too far off, "off" will be bigger than 0. final Vector direction = loc.getDirection(); final double off = TrigUtil.directionCheck(loc, player.getEyeHeight(), direction, block, TrigUtil.DIRECTION_PRECISION); if (off > 0.1D) { - // Player failed the check. Let's try to guess how far he was from looking directly to the block... + // Player failed the check. Let's try to guess how far they were from looking directly to the block... final Vector blockEyes = new Vector(0.5 + block.getX() - loc.getX(), 0.5 + block.getY() - loc.getY() - player.getEyeHeight(), 0.5 + block.getZ() - loc.getZ()); final double distance = blockEyes.crossProduct(direction).length() / direction.length(); @@ -62,7 +62,7 @@ public class Direction extends Check { // cancel the event. cancel = executeActions(player, data.directionVL, distance, cc.directionActions); } else - // Player did likely nothing wrong, reduce violation counter to reward him. + // Player did likely nothing wrong, reduce violation counter to reward them. data.directionVL *= 0.9D; return cancel; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Reach.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Reach.java index 7c29c165..764d5ede 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Reach.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Reach.java @@ -53,12 +53,12 @@ public class Reach extends Check { 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 + // Distance is calculated from eye location to center of targeted block. If the player is further away from their // target than allowed, the difference will be assigned to "distance". final double distance = TrigUtil.distance(loc.getX(), loc.getY() + player.getEyeHeight(), loc.getZ(), 0.5 + block.getX(), 0.5 + block.getY(), 0.5 + block.getZ()) - distanceLimit; if (distance > 0) { - // He failed, increment violation level. + // They failed, increment violation level. data.reachVL += distance; // Remember how much further than allowed he tried to reach for logging, if necessary. @@ -70,7 +70,7 @@ public class Reach extends Check { vd.setParameter(ParameterName.REACH_DISTANCE, String.valueOf(Math.round(data.reachDistance))); cancel = executeActions(vd); } else - // Player passed the check, reward him. + // Player passed the check, reward them. data.reachVL *= 0.9D; return cancel; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Visible.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Visible.java index 31f574c7..d76d00cb 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Visible.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockinteract/Visible.java @@ -75,7 +75,7 @@ public class Visible extends Check { // TODO: Reachable face check ? if (blockX == Location.locToBlock(eyeX) && blockZ == Location.locToBlock(eyeZ) && block.getY() == Location.locToBlock(eyeY)){ - // Player is interacting with the block his head is in. + // Player is interacting with the block their head is in. // TODO: Should the reachable-face-check be done here too (if it is added at all)? collides = false; } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/BlockPlaceListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/BlockPlaceListener.java index 69fe5374..f66ca875 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/BlockPlaceListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/BlockPlaceListener.java @@ -152,7 +152,7 @@ public class BlockPlaceListener extends CheckListener { } } - // Second, the no swing check (player doesn't swing his arm when placing a lily pad). + // Second, the no swing check (player doesn't swing their arm when placing a lily pad). if (!cancelled && mat != Material.WATER_LILY && noSwing.isEnabled(player) && noSwing.check(player, data)) cancelled = true; @@ -191,7 +191,7 @@ public class BlockPlaceListener extends CheckListener { /** * We listen to PlayerAnimation events because it is (currently) equivalent to "player swings arm" and we want to - * check if he did that between block breaks. + * check if they did that between block breaks. * * @param event * the event diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Direction.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Direction.java index 351fc196..c3f7f420 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Direction.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Direction.java @@ -19,7 +19,7 @@ import fr.neatmonster.nocheatplus.utilities.TrigUtil; * MMMMMMMMMMM */ /** - * The Direction check will find out if a player tried to interact with something that's not in his field of view. + * The Direction check will find out if a player tried to interact with something that's not in their field of view. */ public class Direction extends Check { @@ -44,7 +44,7 @@ public class Direction extends Check { boolean cancel = false; - // How far "off" is the player with his aim. We calculate from the players eye location and view direction to + // How far "off" is the player with their aim. We calculate from the players eye location and view direction to // the center of the target block. If the line of sight is more too far off, "off" will be bigger than 0. final Location loc = player.getLocation(); final Vector direction = loc.getDirection(); @@ -53,7 +53,7 @@ public class Direction extends Check { // Now check if the player is looking at the block from the correct side. double off2 = 0.0D; - // Find out against which face the player tried to build, and if he + // Find out against which face the player tried to build, and if they // stood on the correct side of it if (placed.getX() > against.getX()) off2 = against.getX() + 0.5D - loc.getX(); @@ -68,12 +68,12 @@ public class Direction extends Check { else if (placed.getZ() < against.getZ()) off2 = -(against.getZ() + 0.5D - loc.getZ()); - // If he wasn't on the correct side, add that to the "off" value + // If they weren't on the correct side, add that to the "off" value if (off2 > 0.0D) off += off2; if (off > 0.1D) { - // Player failed the check. Let's try to guess how far he was from looking directly to the block... + // Player failed the check. Let's try to guess how far they were from looking directly to the block... final Vector blockEyes = new Vector(0.5 + placed.getX() - loc.getX(), 0.5 + placed.getY() - loc.getY() - player.getEyeHeight(), 0.5 + placed.getZ() - loc.getZ()); final double distance = blockEyes.crossProduct(direction).length() / direction.length(); @@ -85,7 +85,7 @@ public class Direction extends Check { cancel = executeActions(player, data.directionVL, distance, BlockPlaceConfig.getConfig(player).directionActions); } else - // Player did likely nothing wrong, reduce violation counter to reward him. + // Player did likely nothing wrong, reduce violation counter to reward them. data.directionVL *= 0.9D; return cancel; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/NoSwing.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/NoSwing.java index 7cd9e531..5e73b9a8 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/NoSwing.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/NoSwing.java @@ -16,7 +16,7 @@ import fr.neatmonster.nocheatplus.checks.CheckType; * d8888P */ /** - * We require that the player moves his arm between block places, this is what gets checked here. + * We require that the player moves their arm between block places, this is what gets checked here. */ public class NoSwing extends Check { @@ -39,14 +39,14 @@ public class NoSwing extends Check { boolean cancel = false; - // Did he swing his arm before? + // Did they swing their arm before? if (data.noSwingArmSwung) { // "Consume" the flag. data.noSwingArmSwung = false; // Reward with lowering of the violation level. data.noSwingVL *= 0.9D; } else { - // He failed, increase violation level. + // They failed, increase violation level. data.noSwingVL += 1D; // Execute whatever actions are associated with this check and the violation level and find out if we should diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Reach.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Reach.java index 1681489a..be5f1a8e 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Reach.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Reach.java @@ -55,22 +55,22 @@ public class Reach extends Check { 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 + // Distance is calculated from eye location to center of targeted block. If the player is further away from their // target than allowed, the difference will be assigned to "distance". final double distance = TrigUtil.distance(player.getEyeLocation(), block) - distanceLimit; if (distance > 0) { - // He failed, increment violation level. + // They failed, increment violation level. data.reachVL += distance; - // Remember how much further than allowed he tried to reach for logging, if necessary. + // Remember how much further than allowed they tried to reach for logging, if necessary. data.reachDistance = distance; // Execute whatever actions are associated with this check and the violation level and find out if we should // cancel the event. cancel = executeActions(player, data.reachVL, distance, BlockPlaceConfig.getConfig(player).reachActions); } else{ - // Player passed the check, reward him. + // Player passed the check, reward them. data.reachVL *= 0.9D; } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Speed.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Speed.java index 1d5a8947..e2ae8960 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Speed.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/blockplace/Speed.java @@ -45,7 +45,7 @@ public class Speed extends Check { if (data.speedLastRefused) { final double difference = cc.speedInterval - System.currentTimeMillis() + data.speedLastTime; - // He failed, increase this violation level. + // They failed, increase this violation level. data.speedVL += difference; // Execute whatever actions are associated with this check and the violation level and find out if we @@ -55,7 +55,7 @@ public class Speed extends Check { data.speedLastRefused = true; } else { - // Reward him by lowering his violation level. + // Reward them by lowering their violation level. data.speedVL *= 0.9D; data.speedLastRefused = false; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/chat/Captcha.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/chat/Captcha.java index 584acd61..05c618c2 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/chat/Captcha.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/chat/Captcha.java @@ -28,15 +28,15 @@ public class Captcha extends AsyncCheck implements ICaptcha{ public void checkCaptcha(Player player, String message, ChatConfig cc, ChatData data, boolean isMainThread) { // Correct answer to the captcha? if (message.equals(data.captchaGenerated)) { - // Yes, clear his data and do not worry anymore about him. + // Yes, clear their data and do not worry anymore about them. data.reset(); data.captchaStarted = false; player.sendMessage(ColorUtil.replaceColors(cc.captchaSuccess)); } else { - // Increment his tries number counter. + // Increment their tries number counter. data.captchTries++; data.captchaVL ++; - // Does he failed too much times? + // Have they failed too man times? if (data.captchTries > cc.captchaTries) { // Find out if we need to kick the player or not. executeActions(player, data.captchaVL, 1, cc.captchaActions, diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Angle.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Angle.java index 3b0e16a1..7bb5ecc2 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Angle.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Angle.java @@ -132,7 +132,7 @@ public class Angle extends Check { // cancel the event. cancel = executeActions(player, data.angleVL, violation, cc.angleActions); } else - // Reward the player by lowering his violation level. + // Reward the player by lowering their violation level. data.angleVL *= 0.98D; return cancel; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Direction.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Direction.java index 10160733..75abb4e8 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Direction.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Direction.java @@ -19,7 +19,7 @@ import fr.neatmonster.nocheatplus.utilities.TrigUtil; * MMMMMMMMMMM */ /** - * The Direction check will find out if a player tried to interact with something that's not in his field of view. + * The Direction check will find out if a player tried to interact with something that's not in their field of view. */ public class Direction extends Check { @@ -60,7 +60,7 @@ public class Direction extends Check { // TODO: allow any hit on the y axis (might just adapt interface to use foot position + height)! - // How far "off" is the player with his aim. We calculate from the players eye location and view direction to + // How far "off" is the player with their aim. We calculate from the players eye location and view direction to // the center of the target entity. If the line of sight is more too far off, "off" will be bigger than 0. final Location loc = player.getLocation(); final Vector direction = player.getEyeLocation().getDirection(); @@ -75,7 +75,7 @@ public class Direction extends Check { } if (off > 0.1) { - // Player failed the check. Let's try to guess how far he was from looking directly to the entity... + // Player failed the check. Let's try to guess how far they were from looking directly to the entity... final Vector blockEyes = new Vector(dLoc.getX() - loc.getX(), dLoc.getY() + height / 2D - loc.getY() - player.getEyeHeight(), dLoc.getZ() - loc.getZ()); final double distance = blockEyes.crossProduct(direction).length() / direction.length(); @@ -90,7 +90,7 @@ public class Direction extends Check { // If we should cancel, remember the current time too. data.directionLastViolationTime = System.currentTimeMillis(); } else - // Reward the player by lowering his violation level. + // Reward the player by lowering their violation level. data.directionVL *= 0.8D; // If the player is still in penalty time, cancel the event anyway. @@ -101,7 +101,7 @@ public class Direction extends Check { if (data.directionLastViolationTime > System.currentTimeMillis()) data.directionLastViolationTime = 0; - // He is in penalty time, therefore request cancelling of the event. + // They are in penalty time, therefore request cancelling of the event. return true; } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java index 6e2619fd..8a2180dd 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java @@ -291,7 +291,7 @@ public class FightListener extends CheckListener implements JoinLeaveListener{ final boolean damagedIsDead = damaged.isDead(); if (damagedPlayer != null && !damagedIsDead) { if (!damagedPlayer.isDead() && godMode.isEnabled(damagedPlayer) && godMode.check(damagedPlayer, BridgeHealth.getDamage(event), damagedData)){ - // It requested to "cancel" the players invulnerability, so set his noDamageTicks to 0. + // It requested to "cancel" the players invulnerability, so set their noDamageTicks to 0. damagedPlayer.setNoDamageTicks(0); } if (BridgeHealth.getHealth(damagedPlayer) >= BridgeHealth.getMaxHealth(damagedPlayer)){ diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/GodMode.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/GodMode.java index b314d33a..f76f312d 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/GodMode.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/GodMode.java @@ -173,7 +173,7 @@ public class GodMode extends Check { } /** - * If a player apparently died, make sure he really dies after some time if he didn't already, by setting up a + * If a player apparently died, make sure they really die after some time if they didn't already, by setting up a * Bukkit task. * * @param player @@ -190,9 +190,9 @@ public class GodMode extends Check { @Override public void run() { try { - // Check again if the player should be dead, and if the game didn't mark him as dead. + // Check again if the player should be dead, and if the game didn't mark them as dead. if (mcAccess.shouldBeZombie(player)){ - // Artificially "kill" him. + // Artificially "kill" them. mcAccess.setDead(player, 19); } } catch (final Exception e) {} diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/NoSwing.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/NoSwing.java index 35c9053f..003fed71 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/NoSwing.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/NoSwing.java @@ -16,7 +16,7 @@ import fr.neatmonster.nocheatplus.checks.CheckType; * d8888P */ /** - * We require that the player moves his arm between attacks, this is basically what gets checked here. + * We require that the player moves their arm between attacks, this is basically what gets checked here. */ public class NoSwing extends Check { @@ -39,13 +39,13 @@ public class NoSwing extends Check { boolean cancel = false; - // Did he swing his arm before? + // Did they swing his arm before? if (data.noSwingArmSwung) { - // Yes, reward him with reduction of his violation level. + // Yes, reward them with reduction of their violation level. data.noSwingArmSwung = false; data.noSwingVL *= 0.9D; } else { - // No, increase his violation level. + // No, increase their violation level. data.noSwingVL += 1D; // Execute whatever actions are associated with this check and the violation level and find out if we should diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Reach.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Reach.java index 076d8254..69cc3240 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Reach.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/Reach.java @@ -91,7 +91,7 @@ public class Reach extends Check { final Vector pRel = dRef.toVector().subtract(pRef.toVector()); - // Distance is calculated from eye location to center of targeted. If the player is further away from his target + // Distance is calculated from eye location to center of targeted. If the player is further away from their target // than allowed, the difference will be assigned to "distance". final double lenpRel = pRel.length(); @@ -100,7 +100,7 @@ public class Reach extends Check { final double reachMod = data.reachMod; if (violation > 0) { - // He failed, increment violation level. This is influenced by lag, so don't do it if there was lag. + // They failed, increment violation level. This is influenced by lag, so don't do it if there was lag. if (TickTask.getLag(1000) < 1.5f){ // TODO: 1.5 is a fantasy value. data.reachVL += violation; @@ -124,7 +124,7 @@ public class Reach extends Check { Improbable.feed(player, (float) (lenpRel - distanceLimit * reachMod) / 4f, System.currentTimeMillis()); } else{ - // Player passed the check, reward him. + // Player passed the check, reward them. data.reachVL *= 0.8D; } @@ -147,7 +147,7 @@ public class Reach extends Check { data.reachLastViolationTime = 0; } - // He is in penalty time, therefore request cancelling of the event. + // They are in penalty time, therefore request cancelling of the event. cancelByPenalty = !cancel; cancel = true; } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/Drop.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/Drop.java index 8a0a1ed4..9dad195e 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/Drop.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/Drop.java @@ -56,9 +56,9 @@ public class Drop extends Check { data.dropCount++; - // The player dropped more than he should. + // The player dropped more than they should. if (data.dropCount > cc.dropLimit) { - // Set his violation level. + // Set their violation level. data.dropVL = data.dropCount - cc.dropLimit; // Execute whatever actions are associated with this check and the violation level and find out if we should diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InstantBow.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InstantBow.java index 72b5596f..c6d247c1 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InstantBow.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InstantBow.java @@ -18,7 +18,7 @@ import fr.neatmonster.nocheatplus.utilities.TickTask; * MMMM M#########M */ /** - * The InstantBow check will find out if a player pulled the string of his bow too fast. + * The InstantBow check will find out if a player pulled the string of their bow too fast. */ public class InstantBow extends Check { @@ -54,7 +54,7 @@ public class InstantBow extends Check { final long pullDuration = now - (cc.instantBowStrict ? data.instantBowInteract : data.instantBowShoot); if ((!cc.instantBowStrict || data.instantBowInteract > 0) && pullDuration >= expectedPullDuration){ - // The player was slow enough, reward him by lowering his violation level. + // The player was slow enough, reward them by lowering their violation level. data.instantBowVL *= 0.9D; } else if (data.instantBowInteract > now){ @@ -68,7 +68,7 @@ public class InstantBow extends Check { // TODO: Consider: Allow one time but set yawrate penalty time ? final double difference = (expectedPullDuration - pullDuration) / 100D; - // Player was too fast, increase his violation level. + // Player was too fast, increase their violation level. data.instantBowVL += difference; // Execute whatever actions are associated with this check and the diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InstantEat.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InstantEat.java index cc4ac90d..46c52127 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InstantEat.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InstantEat.java @@ -19,7 +19,7 @@ import fr.neatmonster.nocheatplus.checks.ViolationData; * MMMM MMMMMMMMMMMM */ /** - * The InstantEat check will find out if a player eats his food too fast. + * The InstantEat check will find out if a player eats their food too fast. */ public class InstantEat extends Check { @@ -64,7 +64,7 @@ public class InstantEat extends Check { else { final double difference = (expectedTimeWhenEatingFinished - time) / 100D; - // Player was too fast, increase his violation level. + // Player was too fast, increase their violation level. data.instantEatVL += difference; // Execute whatever actions are associated with this check and the violation level and find out if we should diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java index dcdfc13b..8471056c 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/inventory/InventoryListener.java @@ -232,7 +232,7 @@ public class InventoryListener extends CheckListener implements JoinLeaveListen Items.checkIllegalEnchantments(player, item.getItemStack()); } - // If the player died, all his items are dropped so ignore him. + // If the player died, all their items are dropped so ignore them. if (event.getPlayer().isDead()) return; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePackets.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePackets.java index 035c9193..f21732e2 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePackets.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePackets.java @@ -49,7 +49,7 @@ public class MorePackets extends Check { * * Players get assigned a certain amount of "free" packets as a limit initially. Every move packet reduces that * limit by 1. If more than 1 second of time passed, the limit gets increased by 22 * time in seconds, up to 50 and - * he gets a new "setback" location. If the player reaches limit = 0 -> teleport him back to "setback". If there was + * they get a new "setback" location. If the player reaches limit = 0 -> teleport them back to "setback". If there was * a long pause (maybe lag), limit may be up to 100. * * @param player @@ -76,7 +76,7 @@ public class MorePackets extends Check { // Take a packet from the buffer. data.morePacketsBuffer--; - // Player used up buffer, he fails the check. + // Player used up buffer, they fail the check. if (data.morePacketsBuffer < 0) { data.morePacketsPackets = -data.morePacketsBuffer; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePacketsVehicle.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePacketsVehicle.java index 9ed118db..cad1b059 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePacketsVehicle.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePacketsVehicle.java @@ -85,7 +85,7 @@ public class MorePacketsVehicle extends Check { return data.getMorePacketsVehicleSetBack(); } - // Player used up buffer, he fails the check. + // Player used up buffer, they fail the check. if (data.morePacketsVehicleBuffer < 0) { data.morePacketsVehiclePackets = -data.morePacketsVehicleBuffer; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java index ee8a5190..75b31467 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java @@ -359,7 +359,7 @@ public class MovingListener extends CheckListener implements TickListener, IRemo } /** - * When a player changes his gamemode, all information related to the moving checks becomes invalid. + * When a player changes their gamemode, all information related to the moving checks becomes invalid. * * @param event * the event @@ -390,7 +390,7 @@ public class MovingListener extends CheckListener implements TickListener, IRemo } /** - * When a player moves, he will be checked for various suspicious behaviors.
+ * When a player moves, they will be checked for various suspicious behaviors.
* (lowest priority) * * @param event @@ -622,11 +622,11 @@ public class MovingListener extends CheckListener implements TickListener, IRemo // Morepackets. if (newTo == null && cc.morePacketsCheck && !NCPExemptionManager.isExempted(player, CheckType.MOVING_MOREPACKETS) && !player.hasPermission(Permissions.MOVING_MOREPACKETS)) { - // If he hasn't been stopped by any other check and is handled by the more packets check, execute it. + // If it hasn't been stopped by any other check and is handled by the more packets check, execute it. // TODO: Still feed morepackets even if cancelled. newTo = morePackets.check(player, pFrom, pTo, data, cc); } else { - // Otherwise we need to clear his data. + // Otherwise we need to clear their data. data.clearMorePacketsData(); } @@ -1098,7 +1098,7 @@ public class MovingListener extends CheckListener implements TickListener, IRemo System.out.println("[NoCheatPlus] VehicleMoveEvent fired for: " + entityType); } } - // TODO: Might account for the case of a player letting the vehicle move but not himself (do mind latency). + // TODO: Might account for the case of a player letting the vehicle move but not themself (do mind latency). // Mind that players could be riding horses inside of minecarts etc. if (vehicle.getVehicle() != null) { // Do ignore events for vehicles inside of other vehicles. @@ -1154,7 +1154,7 @@ public class MovingListener extends CheckListener implements TickListener, IRemo newTo = morePacketsVehicle.check(player, from, to, data, cc); } else{ - // Otherwise we need to clear his data. + // Otherwise we need to clear their data. data.clearMorePacketsData(); } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java index 92752e23..51aec121 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java @@ -573,7 +573,7 @@ public class SurvivalFly extends Check { return hAllowedDistance; } - // If the player is on ice, give him an higher maximum speed. + // If the player is on ice, give them a higher maximum speed. if (data.sfOnIce > 0) { hAllowedDistance *= modIce; } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java index 5d8b0c21..f462397a 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java @@ -503,7 +503,7 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.STRINGS + ".ban-ip", "ban-ip [ip]"); set(ConfPaths.STRINGS + ".bautosign", start + "failed autosign with [tags]" + end); set(ConfPaths.STRINGS + ".bbfrequency", start + "tried to break too many blocks within time frame" + end); - set(ConfPaths.STRINGS + ".bdirection", start + "tried to interact with a block out of his line of sight" + end); + set(ConfPaths.STRINGS + ".bdirection", start + "tried to interact with a block out of their line of sight" + end); set(ConfPaths.STRINGS + ".bedleave", start + "sends bed leave packets (was not in bed)" + end); set(ConfPaths.STRINGS + ".bpspeed", start + "tried to throw projectiles too quickly" + end); set(ConfPaths.STRINGS + ".breach", start + "exceeds block-interact distance ([reachdistance])" + end); @@ -518,7 +518,7 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.STRINGS + ".drop", start + "tried to drop more items than allowed" + end); set(ConfPaths.STRINGS + ".dropkick", "ncp delay ncp kick [player] Dropping items too fast."); set(ConfPaths.STRINGS + ".fastbreak", start + "tried to break blocks ([blockid]) faster than possible" + end); - set(ConfPaths.STRINGS + ".fastclick", start + "tried to move items in his inventory too quickly" + end); + set(ConfPaths.STRINGS + ".fastclick", start + "tried to move items in their inventory too quickly" + end); set(ConfPaths.STRINGS + ".fastconsume", start + "consumes [food] [tags] too fast" + end); set(ConfPaths.STRINGS + ".fastheal", start + "regenerates health faster than usual" + end); set(ConfPaths.STRINGS + ".fastplace", start + "tried to place too many blocks" + end); diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/hooks/NCPExemptionManager.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/hooks/NCPExemptionManager.java index d8e12f53..52212bad 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/hooks/NCPExemptionManager.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/hooks/NCPExemptionManager.java @@ -225,7 +225,7 @@ public class NCPExemptionManager { for (final CheckType checkType : CheckType.values()) // Check if player is exempted from something. if (isExempted(entityId, checkType)) - // If he is, we can't remove him so we return. + // If they are, we can't remove them so we return. return; registeredPlayers.remove(player.getName()); }