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
    • world

      private final Level world
    • target

      @Nullable private final HitResult target
    • result

      private ItemStack result
  • Constructor Details

  • Method Details

    • getEmptyBucket

      @Nonnull public ItemStack getEmptyBucket()
    • getWorld

      public Level getWorld()
    • getTarget

      @Nullable public HitResult getTarget()
    • getFilledBucket

      @Nonnull public ItemStack getFilledBucket()
    • setFilledBucket

      public void setFilledBucket(@Nonnull ItemStack bucket)