Default minecraft alias to redirect (#12146)
While the running server will still be using the recently introduced copy-mechanic for vanilla command namespacing, the data converter logic relies on the fact that namespaced aliases were redirects as well. To not break the converted, the commands type now takes a modern flag only set by the running server.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package io.papermc.paper.command.brigadier;
|
||||
|
||||
import ca.spottedleaf.dataconverter.util.CommandArgumentUpgrader;
|
||||
import org.bukkit.support.environment.Normal;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Normal
|
||||
public class DFUCommandArgumentUpgraderCompatTest {
|
||||
|
||||
@Test
|
||||
public void testCompatibilityWithCommandArgumentUpgrader() {
|
||||
// The Command argument upgrader has some specific assumptions about the tree, specifically around
|
||||
// Attempt to construct it and to that degree its tree of commands.
|
||||
CommandArgumentUpgrader.upgrader_1_20_4_to_1_20_5(999);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public class MinecraftCommandPermissionsTest {
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
Set<String> perms = collectMinecraftCommandPerms();
|
||||
|
||||
Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.simple(RegistryHelper.getRegistry(), FeatureFlags.VANILLA_SET));
|
||||
Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.simple(RegistryHelper.getRegistry(), FeatureFlags.VANILLA_SET), true);
|
||||
RootCommandNode<CommandSourceStack> root = commands.getDispatcher().getRoot();
|
||||
Set<String> missing = new LinkedHashSet<>();
|
||||
Set<String> foundPerms = new HashSet<>();
|
||||
|
||||
Reference in New Issue
Block a user