diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java index a08a8b1c2..fd57be3d8 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotSquared.java @@ -1320,7 +1320,7 @@ import java.util.zip.ZipInputStream; .filter(validArgument -> args.toLowerCase(Locale.ENGLISH).contains(validArgument)) .count(); - String[] split = args.toLowerCase(Locale.ENGLISH).split(","); + String[] split = args.toLowerCase(Locale.ENGLISH).split(",(?![^\\(\\[]*[\\]\\)])"); if (split.length > expected) { // This means we have multi-block block buckets diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Configuration.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Configuration.java index a4fe5a8b5..dc143f1e4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Configuration.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/config/Configuration.java @@ -66,7 +66,7 @@ public class Configuration { return new BlockBucket(); } final BlockBucket blockBucket = new BlockBucket(); - final String[] parts = string.split(","); + final String[] parts = string.split(",(?![^\\(\\[]*[\\]\\)])"); for (final String part : parts) { String block = part; int chance = -1; @@ -99,7 +99,7 @@ public class Configuration { if (string == null || string.isEmpty()) { return false; } - final String[] parts = string.split(","); + final String[] parts = string.split(",(?![^\\(\\[]*[\\]\\)])"); for (final String part : parts) { String block = part; if (part.contains(":")) {