Package net.minecraft.command

Examples of net.minecraft.command.CommandException


        found = mode;
        break;
      }

    if (found == null)
      throw new CommandException("No beekeeping mode called '%s' is available.", arguments[1]);

    sendChatMessage(sender, "\u00A7aMode: " + found.getName());
    for (String desc : found.getDescription())
      sendChatMessage(sender, StringUtil.localize(desc));
  }
View Full Code Here


            }

            if ((var7.getBlock(var3, var4, var5) == Blocks.air || !((var7.getBlock(var3, var4, var5)) instanceof BlockButton))
                    && !(((var7.getBlock(var3, var4, var5)) instanceof BlockLever)))
            {
                throw new CommandException("Button/Lever Not Found");
            }
            else
            {
                var7.getBlock(var3, var4, var5).onBlockActivated(var7, var3, var4, var5, (EntityPlayer) null, 0, 0.0F, 0.0F, 0.0F);
                OutputHandler.chatConfirmation(var1, "Button/Lever Pushed");
View Full Code Here

            var7 = playermp.worldObj;

            if ((var7.getBlock(var3, var4, var5) == Blocks.air || !((var7.getBlock(var3, var4, var5)) instanceof BlockButton))
                    && !(((var7.getBlock(var3, var4, var5)) instanceof BlockLever)))
            {
                throw new CommandException("Button/Lever Not Found");
            }
            else
            {
                var7.getBlock(var3, var4, var5).onBlockActivated(var7, var3, var4, var5, (EntityPlayer) null, 0, 0.0F, 0.0F, 0.0F);
                OutputHandler.chatConfirmation(sender, "Button/Lever Pushed");
View Full Code Here

    }
    try {
      mainCommand.executeCommand(sender, arguments);
    } catch(LPCommandException e) {
      if(e instanceof PermissionDeniedException) {
        throw new CommandException("You are not allowed to execute that command now.");
      } else if(e instanceof CommandNotFoundException) {
        throw new CommandException("The command was not found");
      } else {
        throw new WrongUsageException(this.getCommandUsage(sender));
      }
    }
  }
View Full Code Here

TOP

Related Classes of net.minecraft.command.CommandException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.