Skip to content

Commit

Permalink
Target Brigadier 1.0.17 to fix compatibility with Minecraft 1.16.5 for
Browse files Browse the repository at this point in the history
  • Loading branch information
JorelAli committed Jun 24, 2022
1 parent f3c654d commit 19e6683
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion commandapi-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<dependency>
<groupId>com.mojang</groupId>
<artifactId>brigadier</artifactId>
<version>1.0.18</version>
<version>1.0.17</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static ArgumentSuggestions stringsWithTooltipsAsync(Function<SuggestionInfo, Com
*/
private static Suggestions toSuggestions(SuggestionsBuilder builder, String... suggestions) {
for(String suggestion : suggestions) {
if(suggestion.toLowerCase(Locale.ROOT).startsWith(builder.getRemainingLowerCase())) {
if(suggestion.toLowerCase(Locale.ROOT).startsWith(builder.getRemaining().toLowerCase(Locale.ROOT))) {
builder.suggest(suggestion);
}
}
Expand All @@ -122,7 +122,7 @@ private static Suggestions toSuggestions(SuggestionsBuilder builder, String... s
*/
private static Suggestions toSuggestions(SuggestionsBuilder builder, IStringTooltip... suggestions) {
for(IStringTooltip suggestion : suggestions) {
if(!suggestion.getSuggestion().toLowerCase(Locale.ROOT).startsWith(builder.getRemainingLowerCase())) {
if(!suggestion.getSuggestion().toLowerCase(Locale.ROOT).startsWith(builder.getRemaining().toLowerCase(Locale.ROOT))) {
continue;
}

Expand Down

0 comments on commit 19e6683

Please sign in to comment.