Skip to content

Commit

Permalink
GH-321 Fix sync tabulation on legacy platforms. (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rollczi authored Dec 2, 2023
1 parent edf88ee commit 7063b1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String alias, Str
CompletableFuture<List<String>> future = this.suggest(sender, alias, args);

try {
future.get(0, TimeUnit.MILLISECONDS);
return future.get(0, TimeUnit.MILLISECONDS);
}
catch (TimeoutException exception) {
if (settings.syncSuggestionWarning()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ class TabCompleteProtocolLibAsync extends TabCompleteSync {

TabCompleteProtocolLibAsync(Plugin plugin, Scheduler scheduler) {
this.scheduler = scheduler;
this.tryReplaceConsoleTabCompleter(plugin.getServer());
MANAGER.addPacketListener(listener = new PacketAdapter(plugin, PacketType.Play.Client.TAB_COMPLETE) {
@Override
public void onPacketReceiving(PacketEvent event) {
handlePacket(event);
}
});

this.tryReplaceConsoleTabCompleter(plugin.getServer());
}

private void tryReplaceConsoleTabCompleter(Server server) {
Expand Down

0 comments on commit 7063b1c

Please sign in to comment.