feat: 添加管理员指令

This commit is contained in:
2024-08-08 04:46:07 +08:00
parent 518517a4e0
commit 4d3d93887d
14 changed files with 92 additions and 68 deletions

View File

@@ -12,7 +12,7 @@ public class BungeeBallCommand extends Command {
public static final BungeeBallCommand INSTANCE = new BungeeBallCommand();
public BungeeBallCommand() {
super("hamster-ball", "hamster.ball.admin", "ball");
super("hamster-bungee-ball", "hamster.ball.admin", "bungee-ball", "bball");
}
@Override

View File

@@ -2,7 +2,6 @@ package cn.hamster3.mc.plugin.ball.bungee.listener;
import cn.hamster3.mc.plugin.ball.bungee.HamsterBallPlugin;
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.core.common.api.CoreAPI;
import com.google.common.eventbus.Subscribe;
@@ -23,9 +22,6 @@ public class BallBungeeListener {
@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 BallBungeeListener {
@Subscribe
public void onDispatchPlayerCommandEvent(DispatchPlayerCommandEvent event) {
if (event.getType() != null && event.getType() != BallServerType.GAME) {
return;
}
ProxyServer server = ProxyServer.getInstance();
if (event.getUuid() != null) {
ProxiedPlayer player = server.getPlayer(event.getUuid());