mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-22 02:07:20 +07:00
Votekick edit (#4924)
* Add "yes" and "no" compatibility to votekicks * Lowercase
This commit is contained in:
parent
78a7d15f3e
commit
e08052d7d6
@ -464,12 +464,18 @@ public class NetServer implements ApplicationListener{
|
||||
return;
|
||||
}
|
||||
|
||||
if(!arg[0].equalsIgnoreCase("y") && !arg[0].equalsIgnoreCase("n")){
|
||||
int sign;
|
||||
switch(arg[0].toLowerCase()){
|
||||
case "y", "yes" -> sign = 1;
|
||||
case "n", "no" -> sign = -1;
|
||||
default -> sign = 0;
|
||||
}
|
||||
|
||||
if(sign == 0){
|
||||
player.sendMessage("[scarlet]Vote either 'y' (yes) or 'n' (no).");
|
||||
return;
|
||||
}
|
||||
|
||||
int sign = arg[0].equalsIgnoreCase("y") ? 1 : -1;
|
||||
currentlyKicking[0].vote(player, sign);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user