diff --git a/core/src/mindustry/core/NetServer.java b/core/src/mindustry/core/NetServer.java index 57305333d7..39ddb35bb9 100644 --- a/core/src/mindustry/core/NetServer.java +++ b/core/src/mindustry/core/NetServer.java @@ -275,7 +275,7 @@ public class NetServer implements ApplicationListener{ int page = args.length > 0 ? Strings.parseInt(args[0]) : 1; int pages = Mathf.ceil((float)clientCommands.getCommandList().size / commandsPerPage); - page --; + page--; if(page >= pages || page < 0){ player.sendMessage("[scarlet]'page' must be a number between[orange] 1[] and[orange] " + pages + "[scarlet]."); @@ -724,6 +724,8 @@ public class NetServer implements ApplicationListener{ return; } + Events.fire(new EventType.AdminRequestEvent(player, other, action)); + if(action == AdminAction.wave){ //no verification is done, so admins can hypothetically spam waves //not a real issue, because server owners may want to do just that diff --git a/core/src/mindustry/game/EventType.java b/core/src/mindustry/game/EventType.java index ce55dc5ca0..452f07c3e6 100644 --- a/core/src/mindustry/game/EventType.java +++ b/core/src/mindustry/game/EventType.java @@ -544,4 +544,15 @@ public class EventType{ } } + public static class AdminRequestEvent{ + public final Player player; + public final @Nullable Player other; + public final AdminAction action; + + public AdminRequestEvent(Player player, Player other, AdminAction action){ + this.player = player; + this.other = other; + this.action = action; + } + } }