mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 11:29:48 +07:00
Admin chat command
This commit is contained in:
parent
c27251cfb0
commit
d3e26c7c16
@ -299,6 +299,15 @@ public class NetServer implements ApplicationListener{
|
||||
}
|
||||
});
|
||||
|
||||
clientCommands.<Player>register("a", "<message...>", "Send a message only to admins.", (args, player) -> {
|
||||
if(!player.admin){
|
||||
player.sendMessage("[scarlet]You must be admin to use this command.");
|
||||
return;
|
||||
}
|
||||
|
||||
Groups.player.each(Player::admin, a -> a.sendMessage(args[0], player, "[#FF4000]<Admin>" + NetClient.colorizeName(player.id, player.name)));
|
||||
});
|
||||
|
||||
//duration of a a kick in seconds
|
||||
int kickDuration = 60 * 60;
|
||||
//voting round duration in seconds
|
||||
|
Loading…
Reference in New Issue
Block a user