mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 04:09:07 +07:00
Prevent players to kick themselves (#5988)
This commit is contained in:
parent
e1ba9f16f6
commit
2906c61d06
@ -397,7 +397,9 @@ public class NetServer implements ApplicationListener{
|
||||
}
|
||||
|
||||
if(found != null){
|
||||
if(found.admin){
|
||||
if(found == player){
|
||||
player.sendMessage("[scarlet]You can't vote to kick yourself.");
|
||||
}else if(found.admin){
|
||||
player.sendMessage("[scarlet]Did you really expect to be able to kick an admin?");
|
||||
}else if(found.isLocal()){
|
||||
player.sendMessage("[scarlet]Local players cannot be kicked.");
|
||||
|
Loading…
Reference in New Issue
Block a user