From 41b19fe6ea337df924e96ea8b36dfbbe1976d3ea Mon Sep 17 00:00:00 2001 From: Quad <23436973+QuadraticKid@users.noreply.github.com> Date: Mon, 26 Apr 2021 12:01:53 -0700 Subject: [PATCH] Prevent usage of @ selectors with spreadplayers (#294) --- .../java/pw/kaboom/extras/modules/server/ServerCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java b/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java index 12f01ee..8d6d28b 100644 --- a/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java +++ b/src/main/java/pw/kaboom/extras/modules/server/ServerCommand.java @@ -155,7 +155,9 @@ public final class ServerCommand implements Listener { break; case "/minecraft:spreadplayers": case "/spreadplayers": - if (arr.length >= 5) { + if (arr.length == 7 && arr[6].contains("@")) { + return "cancel"; + } else if (arr.length >= 5) { if (Double.parseDouble(arr[3]) > 0) { arr[3] = "0"; }