String name = args[0];
for (Player p : world.getPlayers()) {
if (p.getName().equalsIgnoreCase(name)) {
player.sendMessage("§eKicking " + p.getName());
p.getSession().send(new KickMessage("Kicked by " + player.getName()));
return;
}
}
player.sendMessage("§eCan't find user " + name + ". No kick.");