Prevent usage of @ selectors with spreadplayers (#294)

This commit is contained in:
Quad 2021-04-26 12:01:53 -07:00 committed by GitHub
parent 235d2c9788
commit 41b19fe6ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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";
}