Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
FixedDev committed Sep 22, 2023
2 parents cb796bb + 7fdacd4 commit 194fe93
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Velocity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<repositories>
<repository>
<id>velocity</id>
<url>https://nexus.velocitypowered.com/repository/maven-public/</url>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>

Expand All @@ -29,7 +29,7 @@
<dependency>
<groupId>com.velocitypowered</groupId>
<artifactId>velocity-api</artifactId>
<version>3.0.0</version>
<version>3.1.2-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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);
}
}

Expand Down
6 changes: 3 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}%%")
}
```

Expand All @@ -26,6 +26,6 @@ dependencies {
<dependency>
<groupId>me.fixeddev</groupId>
<artifactId>commandflow-universal</artifactId>
<version>0.5.3</version>
<version>%%REPLACE_latestReleaseOrSnapshot{me.fixeddev:commandflow-universal}%%</version>
</dependency>
```
```

0 comments on commit 194fe93

Please sign in to comment.