diff --git a/Velocity/pom.xml b/Velocity/pom.xml index 3258d1a7..8a2d24d1 100644 --- a/Velocity/pom.xml +++ b/Velocity/pom.xml @@ -14,8 +14,8 @@ - velocity - https://nexus.velocitypowered.com/repository/maven-public/ + papermc + https://repo.papermc.io/repository/maven-public/ @@ -29,7 +29,7 @@ com.velocitypowered velocity-api - 3.0.0 + 3.1.2-SNAPSHOT provided diff --git a/Velocity/src/main/java/me/fixeddev/commandflow/velocity/VelocityCommandManager.java b/Velocity/src/main/java/me/fixeddev/commandflow/velocity/VelocityCommandManager.java index 15b4f015..67f1242b 100644 --- a/Velocity/src/main/java/me/fixeddev/commandflow/velocity/VelocityCommandManager.java +++ b/Velocity/src/main/java/me/fixeddev/commandflow/velocity/VelocityCommandManager.java @@ -1,5 +1,6 @@ package me.fixeddev.commandflow.velocity; +import com.velocitypowered.api.command.CommandMeta; import com.velocitypowered.api.proxy.ProxyServer; import me.fixeddev.commandflow.CommandContext; import me.fixeddev.commandflow.CommandManager; @@ -98,7 +99,12 @@ public void registerCommand(Command command) { VelocityCommandWrapper velocityCommandWrapper = new VelocityCommandWrapper(command, commandManager, getTranslator()); wrapperMap.put(command.getName(), velocityCommandWrapper); - proxyServer.getCommandManager().register(command.getName(), velocityCommandWrapper, command.getAliases().toArray(new String[0])); + final CommandMeta commandMeta = proxyServer.getCommandManager().metaBuilder(command.getName()) + .aliases(command.getAliases().toArray(new String[0])) + .plugin(plugin) + .build(); + + proxyServer.getCommandManager().register(commandMeta, velocityCommandWrapper); } @Override @@ -119,7 +125,8 @@ public void unregisterCommand(Command command) { VelocityCommandWrapper velocityCommandWrapper = wrapperMap.get(command.getName()); if (velocityCommandWrapper != null) { - proxyServer.getCommandManager().unregister(command.getName()); + final CommandMeta commandMeta = proxyServer.getCommandManager().getCommandMeta(command.getName()); + proxyServer.getCommandManager().unregister(commandMeta); } } diff --git a/docs/installation.md b/docs/installation.md index 58808614..1c21ea84 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -11,7 +11,7 @@ repositories { ``` ```kotlin dependencies { - implementation("me.fixeddev:commandflow-universal:0.5.3") + implementation("me.fixeddev:commandflow-universal:%%REPLACE_latestReleaseOrSnapshot{me.fixeddev:commandflow-universal}%%") } ``` @@ -26,6 +26,6 @@ dependencies { me.fixeddev commandflow-universal - 0.5.3 + %%REPLACE_latestReleaseOrSnapshot{me.fixeddev:commandflow-universal}%% -``` \ No newline at end of file +```