本文整理了Java中org.bukkit.inventory.Inventory.first()
方法的一些代码示例,展示了Inventory.first()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Inventory.first()
方法的具体详情如下:
包路径:org.bukkit.inventory.Inventory
类名称:Inventory
方法名:first
[英]Finds the first slot in the inventory containing an ItemStack with the given materialId.
[中]查找包含具有给定materialId的ItemStack的库存中的第一个槽。
代码示例来源:origin: bergerkiller/BKCommonLib
@Override
public int first(ItemStack item) {
return base.first(item);
}
代码示例来源:origin: eccentricdevotion/TARDIS
int jelly = inv.first(Material.MELON_SLICE);
if (jelly >= 0) {
int bagId;
代码示例来源:origin: eccentricdevotion/TARDIS
int slot = inv.first(m);
while (slot != -1 && cinv.firstEmpty() != -1) {
slot = inv.first(m);
代码示例来源:origin: bergerkiller/BKCommonLib
@Override
public int first(Material material) {
return base.first(material);
}
代码示例来源:origin: bergerkiller/BKCommonLib
@Override
public int first(int materialId) {
return base.first(materialId);
}
代码示例来源:origin: bergerkiller/BKCommonLib
@Override
public int first(ItemStack item) {
return base.first(item);
}
代码示例来源:origin: bergerkiller/BKCommonLib
@Override
public int first(int materialId) {
return base.first(materialId);
}
代码示例来源:origin: bergerkiller/BKCommonLib
@Override
public int first(Material material) {
return base.first(material);
}
代码示例来源:origin: eccentricdevotion/TARDIS
if (inv.contains(Material.MUSIC_DISC_CAT)) {
ItemStack is = inv.getItem(inv.first(Material.MUSIC_DISC_CAT));
if (is != null && is.hasItemMeta()) {
ItemMeta im = is.getItemMeta();
if (im.hasDisplayName() && im.getDisplayName().equals("Biome Storage Disk") && im.hasLore()) {
List<String> lore = im.getLore();
int ladder = inv.first(Material.LADDER);
if (lore.get(0).equals("Blank")) {
List<String> disk_lore = new ArrayList<>();
ItemStack is = inv.getItem(inv.first(Material.MUSIC_DISC_MALL));
if (is != null && is.hasItemMeta()) {
ItemMeta im = is.getItemMeta();
代码示例来源:origin: TheBusyBiscuit/Slimefun4
if (chamber != null) {
if (chamber.getInventory().contains(Material.FLINT_AND_STEEL)) {
ItemStack item = chamber.getInventory().getItem(chamber.getInventory().first(Material.FLINT_AND_STEEL));
item.setDurability((short) (item.getDurability() + 1));
if (item.getDurability() >= item.getType().getMaxDurability()) {
内容来源于网络,如有侵权,请联系作者删除!