KitManager.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:ZvP 作者:
public void addKit(String kitName, ItemStack icon, ItemStack[] items) {

    // splash portion of healing I causes illegal argument exception -> replace it with splash potion of healing II
    for (ItemStack stack : items) {
        if (stack != null && stack.getType() != Material.AIR) {
        if (stack.getItemMeta() instanceof PotionMeta) {
            if (stack.getDurability() == 16453) {
            stack.setDurability((short) 16421);
            }
        }
        }
    }

    IZvPKit kit = new KCustomKit(this.kitPath.getAbsolutePath(), kitName, icon, 0.0, items);
    this.kits.add(kit);
    loadKits();
    }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号