Class EntityDeathEvent

    • Constructor Detail

      • EntityDeathEvent

        public EntityDeathEvent​(@NotNull
                                @NotNull LivingEntity entity,
                                @NotNull
                                @NotNull List<ItemStack> drops)
      • EntityDeathEvent

        public EntityDeathEvent​(@NotNull
                                @NotNull LivingEntity what,
                                @NotNull
                                @NotNull List<ItemStack> drops,
                                int droppedExp)
    • Method Detail

      • getEntity

        @NotNull
        public @NotNull LivingEntity getEntity()
        Description copied from class: EntityEvent
        Returns the Entity involved in this event
        Overrides:
        getEntity in class EntityEvent
        Returns:
        Entity who is involved in this event
      • getDroppedExp

        public int getDroppedExp()
        Gets how much EXP should be dropped from this death.

        This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death.

        Returns:
        Amount of EXP to drop.
      • setDroppedExp

        public void setDroppedExp​(int exp)
        Sets how much EXP should be dropped from this death.

        This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death.

        Parameters:
        exp - Amount of EXP to drop.
      • getDrops

        @NotNull
        public @NotNull List<ItemStack> getDrops()
        Gets all the items which will drop when the entity dies
        Returns:
        Items to drop when the entity dies
      • getHandlerList

        @NotNull
        public static @NotNull HandlerList getHandlerList()