Module gomint.api

Interface EntityItemDrop

  • All Superinterfaces:
    Entity

    public interface EntityItemDrop
    extends Entity
    Version:
    1.0
    Author:
    geNAZt
    • Method Detail

      • create

        static EntityItemDrop create()
        Create a new entity item drop without any configuration. It will use default values when not configured and spawned
        Returns:
        new entity
      • getItemStack

        <T extends ItemStack> T getItemStack()
        Get the ItemStack which has been stored in this entity. You can modify it but it won't update the entity.
        Type Parameters:
        T - generic type of the item stack
        Returns:
        the ItemStack which has been stored
      • setItemStack

        void setItemStack​(ItemStack itemStack)
        Item stack which should be used by this entity. This will silenty fail when the entity is already spawned
        Parameters:
        itemStack - which should be used in this entity
      • setPickupDelay

        void setPickupDelay​(long duration,
                            TimeUnit timeUnit)
        Set a new pickup delay
        Parameters:
        duration - the amount of timeUnit to wait
        timeUnit - the unit of time to wait
      • getPickupTime

        long getPickupTime()
        Get the time when the item drop is allowed to be picked up
        Returns:
        the unix timestamp in millis when the item drop can be picked up