Last active
August 29, 2015 14:04
-
-
Save drtshock/49dbbab9c9d2bdac9bc2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { | |
if(!(sender instanceof Player)) { | |
sender.sendMessage("Player only ;s"); | |
return true; | |
} | |
Player player = (Player) sender; | |
if(args.length != 1) return false; | |
player.setAllowFlight(args[0].equalsIgnoreCase("on")); | |
player.sendMessage("Set flight status to " args[0].equalsIgnoreCase("on") ? ChatColor.GREEN.toString() + "ON" : ChatColor.RED.toString() + "OFF"; | |
return true; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment