From a78196d4d5257f2112570806f2f3435aaf23c5a8 Mon Sep 17 00:00:00 2001 From: james <75051061+notsceptor@users.noreply.github.com> Date: Wed, 29 May 2024 01:24:16 +0100 Subject: [PATCH] Limited the radius to 20 and the strength to 10 --- src/main/java/dev/plex/extras/command/ExpelCommand.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/dev/plex/extras/command/ExpelCommand.java b/src/main/java/dev/plex/extras/command/ExpelCommand.java index e685315..e18a89b 100644 --- a/src/main/java/dev/plex/extras/command/ExpelCommand.java +++ b/src/main/java/dev/plex/extras/command/ExpelCommand.java @@ -3,6 +3,7 @@ package dev.plex.extras.command; import dev.plex.command.PlexCommand; import dev.plex.command.annotation.CommandParameters; import dev.plex.command.annotation.CommandPermissions; +import dev.plex.util.PlexLog; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.minimessage.MiniMessage; import org.bukkit.Location; @@ -30,7 +31,7 @@ public class ExpelCommand extends PlexCommand { try { - radius = Double.parseDouble(args[0]); + radius = Math.min(Double.parseDouble(args[0]), 20.0); } catch (NumberFormatException ignored) { @@ -42,7 +43,7 @@ public class ExpelCommand extends PlexCommand { try { - strength = Double.parseDouble(args[1]); + strength = Math.min(Double.parseDouble(args[1]), 10.0); } catch (NumberFormatException ignored) {