feat: 添加管理员指令
This commit is contained in:
@@ -100,8 +100,8 @@ public class HamsterBallPlugin {
|
||||
return;
|
||||
}
|
||||
CommandMeta commandMeta = proxyServer.getCommandManager()
|
||||
.metaBuilder("hamster-ball")
|
||||
.aliases("ball")
|
||||
.metaBuilder("hamster-velocity-ball")
|
||||
.aliases("velocity-ball", "vball")
|
||||
.plugin(this)
|
||||
.build();
|
||||
proxyServer.getCommandManager().register(commandMeta, VelocityBallCommand.INSTANCE);
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package cn.hamster3.mc.plugin.ball.velocity.listener;
|
||||
|
||||
import cn.hamster3.mc.plugin.ball.common.api.BallAPI;
|
||||
import cn.hamster3.mc.plugin.ball.common.entity.BallServerType;
|
||||
import cn.hamster3.mc.plugin.ball.common.event.operate.*;
|
||||
import cn.hamster3.mc.plugin.ball.velocity.HamsterBallPlugin;
|
||||
import cn.hamster3.mc.plugin.core.common.api.CoreAPI;
|
||||
@@ -23,9 +22,6 @@ public class BallVelocityListener {
|
||||
|
||||
@Subscribe
|
||||
public void onDispatchConsoleCommand(DispatchConsoleCommandEvent event) {
|
||||
if (event.getType() != null && event.getType() != BallServerType.PROXY) {
|
||||
return;
|
||||
}
|
||||
if (event.getServerID() != null && !BallAPI.getInstance().isLocalServer(event.getServerID())) {
|
||||
return;
|
||||
}
|
||||
@@ -35,9 +31,6 @@ public class BallVelocityListener {
|
||||
|
||||
@Subscribe
|
||||
public void onDispatchPlayerCommand(DispatchPlayerCommandEvent event) {
|
||||
if (event.getType() != null && event.getType() != BallServerType.GAME) {
|
||||
return;
|
||||
}
|
||||
ProxyServer server = HamsterBallPlugin.getInstance().getProxyServer();
|
||||
if (event.getUuid() != null) {
|
||||
Player player = server.getPlayer(event.getUuid()).orElse(null);
|
||||
|
Reference in New Issue
Block a user