mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-09-21 13:28:12 +03: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;
|
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).");
|
player.sendMessage("[scarlet]Vote either 'y' (yes) or 'n' (no).");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sign = arg[0].equalsIgnoreCase("y") ? 1 : -1;
|
|
||||||
currentlyKicking[0].vote(player, sign);
|
currentlyKicking[0].vote(player, sign);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user