diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java index 8fbcb4ae07..7521eb10af 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AdjacentMaskParser.java @@ -19,9 +19,9 @@ public AdjacentMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return worldEdit.getMaskFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getMaskFactory().getSuggestions(argumentInput, context).stream(); } else if (index == 1 || index == 2) { return SuggestionHelper.suggestPositiveDoubles(argumentInput); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AngleMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AngleMaskParser.java index dfd62b9b88..ea8e366651 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AngleMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/AngleMaskParser.java @@ -22,7 +22,7 @@ public AngleMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0 || index == 1) { return SuggestionHelper.suggestPositiveDoubles(argumentInput).flatMap(s -> Stream.of(s, s + "d")); } else if (index > 1 && index <= 1 + flags.length) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/BesideMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/BesideMaskParser.java index 954b9f53dc..fd597a216b 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/BesideMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/BesideMaskParser.java @@ -18,9 +18,9 @@ public BesideMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(final String argumentInput, final int index) { + protected Stream getSuggestions(final String argumentInput, final int index, ParserContext context) { if (index == 0) { - return worldEdit.getMaskFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getMaskFactory().getSuggestions(argumentInput, context).stream(); } else if (index == 1 || index == 2) { return SuggestionHelper.suggestPositiveDoubles(argumentInput); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ExtremaMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ExtremaMaskParser.java index a875ec802c..6bab519813 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ExtremaMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ExtremaMaskParser.java @@ -22,7 +22,7 @@ public ExtremaMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0 || index == 1) { return SuggestionHelper.suggestPositiveDoubles(argumentInput).flatMap(s -> Stream.of(s, s + "d")); } else if (index > 1 && index <= 1 + flags.length) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ROCAngleMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ROCAngleMaskParser.java index dff4e8f324..00a285b95f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ROCAngleMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/ROCAngleMaskParser.java @@ -22,7 +22,7 @@ public ROCAngleMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0 || index == 1) { return SuggestionHelper.suggestPositiveDoubles(argumentInput).flatMap(s -> Stream.of(s, s + "d")); } else if (index > 1 && index <= 1 + flags.length) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RadiusMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RadiusMaskParser.java index 8a57c73af6..559b3bab3d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RadiusMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RadiusMaskParser.java @@ -18,7 +18,7 @@ public RadiusMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0 || index == 1) { return SuggestionHelper.suggestPositiveIntegers(argumentInput); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RichOffsetMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RichOffsetMaskParser.java index f6a21ef6fb..47b56cb565 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RichOffsetMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/RichOffsetMaskParser.java @@ -24,12 +24,12 @@ public RichOffsetMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index < 3) { return SuggestionHelper.suggestPositiveIntegers(argumentInput); } if (index == 3) { - return worldEdit.getMaskFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getMaskFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SimplexMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SimplexMaskParser.java index 4674057b2d..f1d2e6c556 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SimplexMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SimplexMaskParser.java @@ -20,7 +20,7 @@ public SimplexMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index < 3) { return SuggestionHelper.suggestPositiveDoubles(argumentInput); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SurfaceAngleMaskParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SurfaceAngleMaskParser.java index ab011f4124..7a85e708be 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SurfaceAngleMaskParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/mask/SurfaceAngleMaskParser.java @@ -23,7 +23,7 @@ public SurfaceAngleMaskParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index <= 2) { return SuggestionHelper.suggestPositiveDoubles(argumentInput); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/AngleColorPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/AngleColorPatternParser.java index 7074fdb130..d471435e6c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/AngleColorPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/AngleColorPatternParser.java @@ -25,7 +25,7 @@ public AngleColorPatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index != 0) { return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/AverageColorPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/AverageColorPatternParser.java index 35d28382db..1fd2e8b2f4 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/AverageColorPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/AverageColorPatternParser.java @@ -25,7 +25,7 @@ public AverageColorPatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index > 4) { return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BiomePatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BiomePatternParser.java index 0adbe2cd79..74e1b5b652 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BiomePatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BiomePatternParser.java @@ -54,7 +54,7 @@ public Stream getSuggestions(String input) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { return BiomeType.REGISTRY.getSuggestions(argumentInput); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPattern2DParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPattern2DParser.java index 246e024c64..4ae760918c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPattern2DParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPattern2DParser.java @@ -26,9 +26,9 @@ public BufferedPattern2DParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + return this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPatternParser.java index 49fd27495f..3660aa9022 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/BufferedPatternParser.java @@ -26,9 +26,9 @@ public BufferedPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + return this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/ColorPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/ColorPatternParser.java index 9b424d5eb1..0363b2ec5b 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/ColorPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/ColorPatternParser.java @@ -26,7 +26,7 @@ public ColorPatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index > 4) { return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/DesaturatePatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/DesaturatePatternParser.java index 2218f479ee..d5ace9036d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/DesaturatePatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/DesaturatePatternParser.java @@ -25,7 +25,7 @@ public DesaturatePatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { return SuggestionHelper.suggestPositiveDoubles(argumentInput); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear2DPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear2DPatternParser.java index 7da0b2377f..3e77a6ef1d 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear2DPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear2DPatternParser.java @@ -28,9 +28,9 @@ public Linear2DPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { return switch (index) { - case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); case 1, 2 -> SuggestionHelper.suggestPositiveIntegers(argumentInput); default -> Stream.empty(); }; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear3DPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear3DPatternParser.java index cd3a7d8db5..7f7ffd7aa8 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear3DPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/Linear3DPatternParser.java @@ -28,9 +28,9 @@ public Linear3DPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { return switch (index) { - case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); case 1, 2, 3 -> SuggestionHelper.suggestPositiveIntegers(argumentInput); default -> Stream.empty(); }; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/LinearPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/LinearPatternParser.java index 785e8261d0..e0d5d31056 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/LinearPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/LinearPatternParser.java @@ -28,9 +28,9 @@ public LinearPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { return switch (index) { - case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); case 1, 2, 3 -> SuggestionHelper.suggestPositiveIntegers(argumentInput); default -> Stream.empty(); }; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/MaskedPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/MaskedPatternParser.java index 3aed039c32..92fcd6f5f3 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/MaskedPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/MaskedPatternParser.java @@ -25,10 +25,10 @@ public MaskedPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { return switch (index) { - case 0 -> this.worldEdit.getMaskFactory().getSuggestions(argumentInput).stream(); - case 1, 2 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + case 0 -> this.worldEdit.getMaskFactory().getSuggestions(argumentInput, context).stream(); + case 1, 2 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); default -> Stream.empty(); }; } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoXPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoXPatternParser.java index 8e3ac729f6..915963d4ca 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoXPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoXPatternParser.java @@ -24,9 +24,9 @@ public NoXPatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + return this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoYPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoYPatternParser.java index 2cc00c8ad1..34e3724a40 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoYPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoYPatternParser.java @@ -24,9 +24,9 @@ public NoYPatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + return this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoZPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoZPatternParser.java index 927d13d0c5..aaa9cf5fd6 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoZPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoZPatternParser.java @@ -24,9 +24,9 @@ public NoZPatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + return this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoisePatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoisePatternParser.java index 37ad974173..d91a66f445 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoisePatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/NoisePatternParser.java @@ -36,12 +36,12 @@ protected NoisePatternParser(WorldEdit worldEdit, String name, Supplier getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { return SuggestionHelper.suggestPositiveDoubles(argumentInput); } if (index == 1) { - return worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/OffsetPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/OffsetPatternParser.java index 6ae72c7a01..ff203208c6 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/OffsetPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/OffsetPatternParser.java @@ -25,9 +25,9 @@ public OffsetPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { return switch (index) { - case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); case 1, 2, 3 -> SuggestionHelper.suggestPositiveIntegers(argumentInput); default -> Stream.empty(); }; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomFullClipboardPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomFullClipboardPatternParser.java index 2af68adc8c..587d8d81f9 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomFullClipboardPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomFullClipboardPatternParser.java @@ -4,6 +4,7 @@ import com.fastasyncworldedit.core.extension.factory.parser.RichParser; import com.fastasyncworldedit.core.extent.clipboard.MultiClipboardHolder; import com.fastasyncworldedit.core.function.pattern.RandomFullClipboardPattern; +import com.google.common.base.Function; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.command.util.SuggestionHelper; import com.sk89q.worldedit.extension.input.InputParseException; @@ -33,7 +34,7 @@ public RandomFullClipboardPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { switch (index) { case 0: if (argumentInput.equals("#") || argumentInput.equals("#c")) { diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomOffsetPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomOffsetPatternParser.java index 2486ef1192..6d910b0ebf 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomOffsetPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RandomOffsetPatternParser.java @@ -25,9 +25,9 @@ public RandomOffsetPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { return switch (index) { - case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); case 1, 2, 3 -> SuggestionHelper.suggestPositiveIntegers(argumentInput); default -> Stream.empty(); }; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RelativePatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RelativePatternParser.java index bf56c1ddb0..43c4d0fbf0 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RelativePatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/RelativePatternParser.java @@ -24,9 +24,9 @@ public RelativePatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + return this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SaturatePatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SaturatePatternParser.java index bb40f029dc..e935215290 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SaturatePatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SaturatePatternParser.java @@ -25,7 +25,7 @@ public SaturatePatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index > 3) { return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SolidRandomOffsetPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SolidRandomOffsetPatternParser.java index 618c463d68..ebc6b74b52 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SolidRandomOffsetPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SolidRandomOffsetPatternParser.java @@ -25,9 +25,9 @@ public SolidRandomOffsetPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { return switch (index) { - case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); case 1, 2, 3 -> SuggestionHelper.suggestPositiveIntegers(argumentInput); default -> Stream.empty(); }; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SurfaceRandomOffsetPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SurfaceRandomOffsetPatternParser.java index aa28b11d8e..31a7060d5c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SurfaceRandomOffsetPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/SurfaceRandomOffsetPatternParser.java @@ -25,9 +25,9 @@ public SurfaceRandomOffsetPatternParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { return switch (index) { - case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + case 0 -> this.worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); case 1 -> SuggestionHelper.suggestPositiveIntegers(argumentInput); default -> Stream.empty(); }; diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/TypeSwapPatternParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/TypeSwapPatternParser.java index 5bf33d3a0a..1c4d25b916 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/TypeSwapPatternParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/pattern/TypeSwapPatternParser.java @@ -28,7 +28,7 @@ public TypeSwapPatternParser(WorldEdit worldEdit) { } @Override - public Stream getSuggestions(String argumentInput, int index) { + public Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index > 2) { return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/Linear3DTransformParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/Linear3DTransformParser.java index 01d4868d31..ef72110c4f 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/Linear3DTransformParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/Linear3DTransformParser.java @@ -23,9 +23,9 @@ public Linear3DTransformParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return worldEdit.getTransformFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getTransformFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/LinearTransformParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/LinearTransformParser.java index 026f38338f..fb646b56b3 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/LinearTransformParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/LinearTransformParser.java @@ -23,9 +23,9 @@ public LinearTransformParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return worldEdit.getTransformFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getTransformFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/OffsetTransformParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/OffsetTransformParser.java index 471359b786..3aeebfd45c 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/OffsetTransformParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/OffsetTransformParser.java @@ -26,11 +26,11 @@ public OffsetTransformParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index < 3) { return SuggestionHelper.suggestPositiveIntegers(argumentInput); } else if (index == 3) { - return worldEdit.getTransformFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getTransformFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/PatternTransformParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/PatternTransformParser.java index cf81db4cef..6405fa5ec6 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/PatternTransformParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/PatternTransformParser.java @@ -24,11 +24,11 @@ public PatternTransformParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index == 0) { - return worldEdit.getPatternFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getPatternFactory().getSuggestions(argumentInput, context).stream(); } else if (index == 1) { - return worldEdit.getTransformFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getTransformFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/RotateTransformParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/RotateTransformParser.java index 19ae8a599d..c7f756efd8 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/RotateTransformParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/RotateTransformParser.java @@ -25,12 +25,12 @@ public RotateTransformParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index < 3) { return SuggestionHelper.suggestPositiveDoubles(argumentInput); } if (index == 3) { - return worldEdit.getTransformFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getTransformFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/ScaleTransformParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/ScaleTransformParser.java index 4bab68d0f9..028c79f051 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/ScaleTransformParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/ScaleTransformParser.java @@ -24,11 +24,11 @@ public ScaleTransformParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index < 3) { return SuggestionHelper.suggestPositiveDoubles(argumentInput); } else if (index == 3) { - return worldEdit.getTransformFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getTransformFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); } diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/SpreadTransformParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/SpreadTransformParser.java index 2f71407b26..b2ad0acbd4 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/SpreadTransformParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/transform/SpreadTransformParser.java @@ -24,11 +24,11 @@ public SpreadTransformParser(WorldEdit worldEdit) { } @Override - protected Stream getSuggestions(String argumentInput, int index) { + protected Stream getSuggestions(String argumentInput, int index, ParserContext context) { if (index < 3) { return SuggestionHelper.suggestPositiveIntegers(argumentInput); } else if (index == 3) { - return worldEdit.getTransformFactory().getSuggestions(argumentInput).stream(); + return worldEdit.getTransformFactory().getSuggestions(argumentInput, context).stream(); } return Stream.empty(); }