Package net.minecraft.entity.player

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.