Examples of canCommandSenderUseCommand()


Examples of net.minecraft.command.ICommand.canCommandSenderUseCommand()

            // Cast to command
            ICommand cmd = (ICommand) cmdObj;

            // Skip commands for which the user has no permissions
            if (!cmd.canCommandSenderUseCommand(sender))
            {
                continue;
            }

            // Initialize string for page.
View Full Code Here

Examples of net.minecraft.command.ICommand.canCommandSenderUseCommand()

            if (icommand == null)
            {
                return 0;
            }

            if (icommand.canCommandSenderUseCommand(sender))
            {
                CommandEvent event = new CommandEvent(icommand, sender, args);
                if (MinecraftForge.EVENT_BUS.post(event))
                {
                    if (event.exception != null)
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayer.canCommandSenderUseCommand()

    if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) {
      EntityPlayer entityPlayer = event.entityPlayer;
      ItemStack usedItem = entityPlayer.getCurrentEquippedItem();
      if (usedItem != null) {
        Item usedItemType = usedItem.getItem();
        if (usedItemType == Item.pocketSundial && (!requireOpForDumpCommand || entityPlayer.canCommandSenderUseCommand(4, "dump"))) {
          Command.sendChat(entityPlayer, DumpCommand.dump(new TableFormatter(entityPlayer), entityPlayer.worldObj, event.x, event.y, event.z, 35).toString());
          event.setCanceled(true);
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.