java.lang.Object
io.github.thebusybiscuit.slimefun4.implementation.listeners.BackpackListener
All Implemented Interfaces:
Listener

public class BackpackListener extends Object implements Listener
This Listener is responsible for all events centered around a SlimefunBackpack. This also includes the Cooler
Author:
TheBusyBiscuit, Walshy, NihilistBrew, AtomicScience, VoidAngel, John000708
See Also:
  • Constructor Details

    • BackpackListener

      public BackpackListener()
  • Method Details

    • register

      public void register(@Nonnull Slimefun plugin)
    • onClose

      public void onClose(InventoryCloseEvent e)
    • onItemDrop

      public void onItemDrop(PlayerDropItemEvent e)
    • onClick

      public void onClick(InventoryClickEvent e)
    • openBackpack

      @ParametersAreNonnullByDefault public void openBackpack(Player p, ItemStack item, SlimefunBackpack backpack)
    • setBackpackId

      public void setBackpackId(@Nonnull OfflinePlayer backpackOwner, @Nonnull ItemStack item, int line, int id)
      This method sets the id for a backpack onto the given ItemStack.
      Parameters:
      backpackOwner - The owner of this backpack
      item - The ItemStack to modify
      line - The line at which the ID should be replaced
      id - The id of this backpack