Class FillBucketEvent


public class FillBucketEvent extends PlayerEvent
This event is fired when a player attempts to use a Empty bucket, it can be canceled to completely prevent any further processing. If you set the result to 'ALLOW', it means that you have processed the event and wants the basic functionality of adding the new ItemStack to your inventory and reducing the stack size to process. setResult(ALLOW) is the same as the old setHandled();
  • Field Details

    • current

      private final ItemStack current
    • level

      private final Level level
    • target

      @Nullable private final @Nullable HitResult target
    • result

      private ItemStack result
  • Constructor Details

    • FillBucketEvent

      public FillBucketEvent(Player player, @NotNull @NotNull ItemStack current, Level level, @Nullable @Nullable HitResult target)
  • Method Details

    • getEmptyBucket

      @NotNull public @NotNull ItemStack getEmptyBucket()
    • getLevel

      public Level getLevel()
    • getTarget

      @Nullable public @Nullable HitResult getTarget()
    • getFilledBucket

      @NotNull public @NotNull ItemStack getFilledBucket()
    • setFilledBucket

      public void setFilledBucket(@NotNull @NotNull ItemStack bucket)