当前位置: 首页>>代码示例>>Java>>正文


Java CraftInventory类代码示例

本文整理汇总了Java中org.bukkit.craftbukkit.inventory.CraftInventory的典型用法代码示例。如果您正苦于以下问题:Java CraftInventory类的具体用法?Java CraftInventory怎么用?Java CraftInventory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CraftInventory类属于org.bukkit.craftbukkit.inventory包,在下文中一共展示了CraftInventory类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: transferTo

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public void transferTo(Container other, org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
    InventoryView source = this.getBukkitView(), destination = other.getBukkitView();
    ((CraftInventory) source.getTopInventory()).getInventory().onClose(player);
    ((CraftInventory) source.getBottomInventory()).getInventory().onClose(player);
    ((CraftInventory) destination.getTopInventory()).getInventory().onOpen(player);
    ((CraftInventory) destination.getBottomInventory()).getInventory().onOpen(player);
}
 
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:8,代码来源:Container.java

示例2: getBukkitView

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
@Override
public InventoryView getBukkitView() {
    if (bukkitEntity != null) {
        return bukkitEntity;
    }

    CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryHorse(this.a);
    return bukkitEntity = new CraftInventoryView(player.player.getBukkitEntity(), inventory, this);
}
 
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:10,代码来源:ContainerHorse.java

示例3: CraftMinecartChest

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public CraftMinecartChest(CraftServer server, net.minecraft.entity.item.EntityMinecartChest entity) {
    super(server, entity);
    inventory = new CraftInventory(entity);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:5,代码来源:CraftMinecartChest.java

示例4: CraftMinecartHopper

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
CraftMinecartHopper(CraftServer server, net.minecraft.entity.item.EntityMinecartHopper entity) {
    super(server, entity);
    inventory = new CraftInventory(entity);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:5,代码来源:CraftMinecartHopper.java

示例5: getInventory

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public Inventory getInventory() {
    return new CraftInventory(dropper);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:CraftDropper.java

示例6: getInventory

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public Inventory getInventory() {
    return new CraftInventory(dispenser);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:CraftDispenser.java

示例7: getInventory

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public Inventory getInventory() {
    return new CraftInventory(hopper);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:CraftHopper.java

示例8: getBlockInventory

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public Inventory getBlockInventory() {
    return new CraftInventory(chest);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:CraftChest.java

示例9: ModInventoryMoveFromPlayerEvent

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public ModInventoryMoveFromPlayerEvent(InventoryPlayer sourceInventory, net.minecraft.item.ItemStack itemStack, IInventory destinationInventory, boolean didSourceInitiate) {
    super(new CraftInventoryPlayer(sourceInventory), CraftItemStack.asCraftMirror(itemStack),new CraftInventory(destinationInventory) , didSourceInitiate);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:ModInventoryMoveFromPlayerEvent.java

示例10: ModInventoryMoveToPlayerEvent

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public ModInventoryMoveToPlayerEvent(IInventory sourceInventory, net.minecraft.item.ItemStack itemStack, InventoryPlayer destinationInventory, boolean didSourceInitiate) {
    super(new CraftInventory(sourceInventory), CraftItemStack.asCraftMirror(itemStack), new CraftInventoryPlayer((InventoryPlayer)destinationInventory), didSourceInitiate);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:ModInventoryMoveToPlayerEvent.java

示例11: ModInventoryMoveEvent

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public ModInventoryMoveEvent(IInventory sourceInventory, net.minecraft.item.ItemStack itemStack, IInventory destinationInventory, boolean didSourceInitiate) {
    super(new CraftInventory(sourceInventory), CraftItemStack.asCraftMirror(itemStack), new CraftInventory(destinationInventory), didSourceInitiate);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:ModInventoryMoveEvent.java

示例12: getInventory

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
@Override
public Inventory getInventory() {
    CraftInventory inventory = new CraftInventory(container);
    return inventory;
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:6,代码来源:CraftCustomContainer.java

示例13: CraftHumanEntity

import org.bukkit.craftbukkit.inventory.CraftInventory; //导入依赖的package包/类
public CraftHumanEntity(final CraftServer server, final net.minecraft.entity.player.EntityPlayer entity) {
    super(server, entity);
    mode = server.getDefaultGameMode();
    this.inventory = new CraftInventoryPlayer(entity.inventory);
    enderChest = new CraftInventory(entity.getInventoryEnderChest());
}
 
开发者ID:CyberdyneCC,项目名称:ThermosRebased,代码行数:7,代码来源:CraftHumanEntity.java


注:本文中的org.bukkit.craftbukkit.inventory.CraftInventory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。