Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple Kill-Command with Levitate
public void onEnable() {
Levitate levitate = new Levitate(this);
levitate.registerCommands(this);
}
@Command(syntax = "?kill <player[online]>", description = "Kill a player", permission = "player.kill", aliases = {"die"})
public void killCommand(CommandSender sender, String cmd, ParameterSet args) {
args.getPlayer(0).setHealth(0);
sender.sendMessage("Player has been killed!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.