mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-15 10:17:39 +07:00
Prevent players to kick themselves (#5988)
This commit is contained in:
@ -397,7 +397,9 @@ public class NetServer implements ApplicationListener{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(found != null){
|
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?");
|
player.sendMessage("[scarlet]Did you really expect to be able to kick an admin?");
|
||||||
}else if(found.isLocal()){
|
}else if(found.isLocal()){
|
||||||
player.sendMessage("[scarlet]Local players cannot be kicked.");
|
player.sendMessage("[scarlet]Local players cannot be kicked.");
|
||||||
|
Reference in New Issue
Block a user