All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.inventory.EntityInventoryHolder Maven / Gradle / Ivy

There is a newer version: 1.20.40-r1
Show newest version
package cn.nukkit.inventory;

import cn.nukkit.api.PowerNukkitXOnly;
import cn.nukkit.api.Since;
import cn.nukkit.item.Item;

public interface EntityInventoryHolder extends InventoryHolder {

    EntityArmorInventory getArmorInventory();

    EntityEquipmentInventory getEquipmentInventory();

    default boolean canEquipByDispenser() {
        return false;
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default Item getHelmet() {
        return getArmorInventory().getHelmet();
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default boolean setHelmet(Item item) {
        return getArmorInventory().setHelmet(item);
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default Item getChestplate() {
        return getArmorInventory().getChestplate();
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default boolean setChestplate(Item item) {
        return getArmorInventory().setChestplate(item);
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default Item getLeggings() {
        return getArmorInventory().getLeggings();
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default boolean setLeggings(Item item) {
        return getArmorInventory().setLeggings(item);
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default Item getBoots() {
        return getArmorInventory().getBoots();
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default boolean setBoots(Item item) {
        return getArmorInventory().setBoots(item);
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default Item getItemInHand() {
        return getEquipmentInventory().getItemInHand();
    }

    @PowerNukkitXOnly
    @Since("1.19.60-r1")
    default Item getItemInOffhand() {
        return this.getEquipmentInventory().getItemInOffhand();
    }

    @PowerNukkitXOnly
    @Since("1.6.0.0-PNX")
    default boolean setItemInHand(Item item) {
        return getEquipmentInventory().setItemInHand(item);
    }

    @PowerNukkitXOnly
    @Since("1.19.60-r1")
    default boolean setItemInHand(Item item, boolean send) {
        return getEquipmentInventory().setItemInHand(item, send);
    }

    @PowerNukkitXOnly
    @Since("1.19.60-r1")
    default boolean setItemInOffhand(Item item) {
        return this.getEquipmentInventory().setItemInOffhand(item, true);
    }

    @PowerNukkitXOnly
    @Since("1.19.60-r1")
    default boolean setItemInOffhand(Item item, boolean send) {
        return this.getEquipmentInventory().setItemInOffhand(item, send);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy