Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class YouBuiltItCommand implements CommandExecutor {
- YouBuiltIt plugin = null;
- public YouBuiltItCommand(YouBuiltIt youBuiltIt) {
- plugin=youBuiltIt;
- }
- @Override
- public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
- String commandName = command.getName().toLowerCase();
- if (sender instanceof Player) {
- Player player = (Player) sender;
- if (commandName.equals("you")) {
- if (args.length == 0) {
- player.sendMessage(ChatColor.RED + "Add on or off");
- }else if(args.length == 1){
- System.out.println("arg[0]:"+args[0]);
- if(args[0].toLowerCase().equals("on")){
- plugin.enableFor(player);
- }else if(args[0].toLowerCase().equals("off")){
- plugin.disableFor(player);
- }
- }
- }
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement