Prevent players to kick themselves (#5988)

This commit is contained in:
Darkness6030
2021-09-13 13:39:23 -04:00
committed by GitHub
parent e1ba9f16f6
commit 2906c61d06
+3 -1
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.");