mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-07 17:34:13 +07:00
Add "pardon" command for votekicks (#1570)
* Add "pardon" command Allows players who have been incorrectly votekicked to join again * isn't hasn't * getInfoOptional & space * pardon me no pun intended * Update ServerControl.java
This commit is contained in:
parent
b512169d44
commit
8e9dabb350
@ -659,6 +659,17 @@ public class ServerControl implements ApplicationListener{
|
||||
err("That IP/ID is not banned!");
|
||||
}
|
||||
});
|
||||
|
||||
handler.register("pardon", "<ID>", "Pardons a votekicked player by ID and allows them to join again.", arg -> {
|
||||
PlayerInfo info = netServer.admins.getInfoOptional(arg[0]);
|
||||
|
||||
if(info != null){
|
||||
info.lastKicked = 0;
|
||||
info("Pardoned player: {0}", info.lastName);
|
||||
}else{
|
||||
err("That ID can't be found.");
|
||||
}
|
||||
});
|
||||
|
||||
handler.register("admin", "<add/remove> <username/ID...>", "Make an online user admin", arg -> {
|
||||
if(!state.is(State.playing)){
|
||||
|
Loading…
Reference in New Issue
Block a user