Prevent players to kick themselves (#5988)

This commit is contained in:
Darkness6030 2021-09-13 20:39:23 +03:00 committed by GitHub
parent e1ba9f16f6
commit 2906c61d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.");