Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
public static final String COMMAND_PREFIX = "/";
private static final ThreadLocal<@Nullable ExecutionContext<CommandSourceStack>> CURRENT_EXECUTION_CONTEXT = new ThreadLocal<>();
private static final Logger LOGGER = LogUtils.getLogger();
@@ -173,6 +_,12 @@
@Override
public @Nullable Identifier suggestionId(final ArgumentCommandNode<CommandSourceStack, ?> node) {
SuggestionProvider<CommandSourceStack> suggestionProvider = node.getCustomSuggestions();
+ // Paper start - Server-side dimension suggestions
+ if (suggestionProvider == null && node.getType() instanceof net.minecraft.commands.arguments.DimensionArgument
+ && io.papermc.paper.configuration.GlobalConfiguration.get().commands.serverSideDimensionSuggestions) {
+ return SuggestionProviders.getName(SuggestionProviders.ASK_SERVER);
+ }
+ // Paper end - Server-side dimension suggestions
return suggestionProvider != null ? SuggestionProviders.getName(suggestionProvider) : null;
}

@@ -183,6 +_,7 @@

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public class UnsupportedSettings extends ConfigurationPart {

public class Commands extends ConfigurationPart {
public boolean suggestPlayerNamesWhenNullTabCompletions = true;
@Comment("Request dimension suggestions from the server to include worlds loaded after the player joined. Players must reconnect or have their commands resent after this setting changes.")
public boolean serverSideDimensionSuggestions = true;
@Comment("Allow mounting entities to a player in the Vanilla '/ride' command.")
public boolean rideCommandAllowPlayerAsVehicle = false;
}
Expand Down
Loading