File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
src/main/java/me/fixeddev/commandflow/velocity Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 14
14
15
15
<repositories >
16
16
<repository >
17
- <id >velocity </id >
18
- <url >https://nexus.velocitypowered.com /repository/maven-public/</url >
17
+ <id >papermc </id >
18
+ <url >https://repo.papermc.io /repository/maven-public/</url >
19
19
</repository >
20
20
</repositories >
21
21
29
29
<dependency >
30
30
<groupId >com.velocitypowered</groupId >
31
31
<artifactId >velocity-api</artifactId >
32
- <version >3.0.0 </version >
32
+ <version >3.1.2-SNAPSHOT </version >
33
33
<scope >provided</scope >
34
34
</dependency >
35
35
</dependencies >
Original file line number Diff line number Diff line change 1
1
package me .fixeddev .commandflow .velocity ;
2
2
3
+ import com .velocitypowered .api .command .CommandMeta ;
3
4
import com .velocitypowered .api .proxy .ProxyServer ;
4
5
import me .fixeddev .commandflow .CommandContext ;
5
6
import me .fixeddev .commandflow .CommandManager ;
@@ -98,7 +99,12 @@ public void registerCommand(Command command) {
98
99
VelocityCommandWrapper velocityCommandWrapper = new VelocityCommandWrapper (command , commandManager , getTranslator ());
99
100
wrapperMap .put (command .getName (), velocityCommandWrapper );
100
101
101
- proxyServer .getCommandManager ().register (command .getName (), velocityCommandWrapper , command .getAliases ().toArray (new String [0 ]));
102
+ final CommandMeta commandMeta = proxyServer .getCommandManager ().metaBuilder (command .getName ())
103
+ .aliases (command .getAliases ().toArray (new String [0 ]))
104
+ .plugin (plugin )
105
+ .build ();
106
+
107
+ proxyServer .getCommandManager ().register (commandMeta , velocityCommandWrapper );
102
108
}
103
109
104
110
@ Override
@@ -119,7 +125,8 @@ public void unregisterCommand(Command command) {
119
125
120
126
VelocityCommandWrapper velocityCommandWrapper = wrapperMap .get (command .getName ());
121
127
if (velocityCommandWrapper != null ) {
122
- proxyServer .getCommandManager ().unregister (command .getName ());
128
+ final CommandMeta commandMeta = proxyServer .getCommandManager ().getCommandMeta (command .getName ());
129
+ proxyServer .getCommandManager ().unregister (commandMeta );
123
130
}
124
131
}
125
132
You can’t perform that action at this time.
0 commit comments