summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/mojang
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-22 12:00:00 +1000
committermd_5 <git@md-5.net>2018-07-22 12:00:00 +1000
commit1a6b4f5392c8cda1e347c10976d394b47936dda6 (patch)
tree3b27585102b8348a432064ca1f1cad1e6488f1ad /src/main/java/com/mojang
parent961295e4327324766a0404857c1ca85051971995 (diff)
downloadcraftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.tar
craftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.tar.gz
craftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.tar.lz
craftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.tar.xz
craftbukkit-1a6b4f5392c8cda1e347c10976d394b47936dda6.zip
Update to Minecraft 1.13
Diffstat (limited to 'src/main/java/com/mojang')
-rw-r--r--src/main/java/com/mojang/brigadier/suggestion/SuggestionsBuilder.java80
1 files changed, 0 insertions, 80 deletions
diff --git a/src/main/java/com/mojang/brigadier/suggestion/SuggestionsBuilder.java b/src/main/java/com/mojang/brigadier/suggestion/SuggestionsBuilder.java
deleted file mode 100644
index 23c7c2c0..00000000
--- a/src/main/java/com/mojang/brigadier/suggestion/SuggestionsBuilder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.mojang.brigadier.suggestion;
-
-import com.mojang.brigadier.Message;
-import com.mojang.brigadier.context.StringRange;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CompletableFuture;
-
-public class SuggestionsBuilder {
- private final String input;
- public int start;
- public String remaining;
- private final List<Suggestion> result = new ArrayList<>();
-
- public SuggestionsBuilder(final String input, final int start) {
- this.input = input;
- this.start = start;
- this.remaining = input.substring(start);
- }
-
- public String getInput() {
- return input;
- }
-
- public int getStart() {
- return start;
- }
-
- public String getRemaining() {
- return remaining;
- }
-
- public Suggestions build() {
- return Suggestions.create(input, result);
- }
-
- public CompletableFuture<Suggestions> buildFuture() {
- return CompletableFuture.completedFuture(build());
- }
-
- public SuggestionsBuilder suggest(final String text) {
- if (text.equals(remaining)) {
- return this;
- }
- result.add(new Suggestion(StringRange.between(start, input.length()), text));
- return this;
- }
-
- public SuggestionsBuilder suggest(final String text, final Message tooltip) {
- if (text.equals(remaining)) {
- return this;
- }
- result.add(new Suggestion(StringRange.between(start, input.length()), text, tooltip));
- return this;
- }
-
- public SuggestionsBuilder suggest(final int value) {
- result.add(new IntegerSuggestion(StringRange.between(start, input.length()), value));
- return this;
- }
-
- public SuggestionsBuilder suggest(final int value, final Message tooltip) {
- result.add(new IntegerSuggestion(StringRange.between(start, input.length()), value, tooltip));
- return this;
- }
-
- public SuggestionsBuilder add(final SuggestionsBuilder other) {
- result.addAll(other.result);
- return this;
- }
-
- public SuggestionsBuilder createOffset(final int start) {
- return new SuggestionsBuilder(input, start);
- }
-
- public SuggestionsBuilder restart() {
- return new SuggestionsBuilder(input, start);
- }
-}