Class Drop2InventoryAPI

java.lang.Object
de.jeff_media.drop2inventory.Drop2InventoryAPI

public class Drop2InventoryAPI
extends Object
Contains all public API methods Drop2Inventory provides
  • Constructor Summary

    Constructors
    Constructor Description
    Drop2InventoryAPI()  
  • Method Summary

    Modifier and Type Method Description
    static void addOrDrop​(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack[] itemStacks, org.bukkit.Location dropLocation)
    Puts the specified ItemStacks into the player's inventory.
    static void addOrDrop​(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack itemStack, org.bukkit.Location dropLocation)
    Puts the specified ItemStack into the player's inventory.
    static boolean hasDropCollectionEnabled​(org.bukkit.entity.Player player)
    Checks whether this player has automatic drop collection enabled
    static boolean hasSeenMessage​(org.bukkit.entity.Player player)
    Checks whether this player has already seen the Drop2Inventory usage message.
    static boolean isDrop2InventoryEnabled()
    Checks whether Drop2Inventory is installed and enabled
    static void registerFutureDrop​(org.bukkit.entity.Player player, org.bukkit.block.Block block)
    Registers a future drop so that Drop2Inventory knows to which player it belongs

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Drop2InventoryAPI

      public Drop2InventoryAPI()
  • Method Details

    • addOrDrop

      public static void addOrDrop​(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack itemStack, org.bukkit.Location dropLocation)
      Puts the specified ItemStack into the player's inventory. If not all items can be stored, the remaining items are dropped at the given location. If Drop2Inventory is not installed, all items will be dropped at the location.
      Parameters:
      player - Player to add the ItemStack to
      itemStack - ItemStack to add or drop
      dropLocation - Location where remaining items are dropped
    • addOrDrop

      public static void addOrDrop​(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack[] itemStacks, org.bukkit.Location dropLocation)
      Puts the specified ItemStacks into the player's inventory. If not all items can be stored, the remaining items are dropped at the given location. If Drop2Inventory is not installed, all items will be dropped at the location.
      Parameters:
      player - Player to add the ItemStack to
      itemStacks - ItemStacks to add or drop
      dropLocation - Location where remaining items are dropped
    • hasDropCollectionEnabled

      public static boolean hasDropCollectionEnabled​(org.bukkit.entity.Player player)
      Checks whether this player has automatic drop collection enabled
      Parameters:
      player - Player to check
      Returns:
      true if drop collection is enabled, false if it's disabled or Drop2Inventory is not installed
    • hasSeenMessage

      public static boolean hasSeenMessage​(org.bukkit.entity.Player player)
      Checks whether this player has already seen the Drop2Inventory usage message.
      Parameters:
      player - Player to check
      Returns:
      true if the player saw the message, false if they haven't or Drop2Inventory is not installed
    • isDrop2InventoryEnabled

      public static boolean isDrop2InventoryEnabled()
      Checks whether Drop2Inventory is installed and enabled
      Returns:
      true if Drop2Inventory is installed and enabled, otherwise false
    • registerFutureDrop

      public static void registerFutureDrop​(org.bukkit.entity.Player player, org.bukkit.block.Block block)
      Registers a future drop so that Drop2Inventory knows to which player it belongs
      Parameters:
      player - The player that this drop belongs to
      block - The block where the items will be dropped