From ad69c34a20c6f3464219a2a84662ca4592a45f4a Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 21 Jul 2022 15:44:32 +0100 Subject: [PATCH] Javadoc --- .../enchantments/util/VelocityChecks.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/VelocityChecks.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/VelocityChecks.java index 536ce6a9..3f805dfb 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/VelocityChecks.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/VelocityChecks.java @@ -4,19 +4,16 @@ import org.bukkit.util.Vector; public class VelocityChecks { /** - * Checks to see if the velocity is unsafe. This is taken from Papers 0054-Add-velocity-warnings.patch - * @param vel - * @return + * Checks to see if the velocity is unsafe. This is taken from Papers 0054-Add-velocity-warnings.patch. + * + * @param vel The velocity. + * @return If unsafe. */ public static boolean isUnsafeVelocity(Vector vel) { final double x = vel.getX(); final double y = vel.getY(); final double z = vel.getZ(); - if (x > 4 || x < -4 || y > 4 || y < -4 || z > 4 || z < -4) { - return true; - } - - return false; + return x > 4 || x < -4 || y > 4 || y < -4 || z > 4 || z < -4; } }