Class ModifiableInventoryHolder

java.lang.Object
org.mvplugins.multiverse.inventories.view.ModifiableInventoryHolder
All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder

@Experimental @AvailableSince("5.2") public final class ModifiableInventoryHolder extends Object implements org.bukkit.inventory.InventoryHolder
A custom InventoryHolder that serves as a marker for modifiable inventories. It stores the necessary context (player, world, profile type, plugin instance) to save changes back to the player's profile when the inventory is closed.
Since:
5.2
  • Constructor Details

    • ModifiableInventoryHolder

      @AvailableSince("5.2") public ModifiableInventoryHolder(@NotNull org.bukkit.OfflinePlayer targetPlayer, @NotNull String worldName, @NotNull ProfileType profileType)
      Parameters:
      targetPlayer -
      worldName -
      profileType -
      Since:
      5.2
  • Method Details

    • getTargetPlayer

      @AvailableSince("5.2") @NotNull public org.bukkit.OfflinePlayer getTargetPlayer()
      Returns:
      Since:
      5.2
    • getWorldName

      @AvailableSince("5.2") @NotNull public String getWorldName()
      Returns:
      Since:
      5.2
    • getProfileType

      @AvailableSince("5.2") @NotNull public ProfileType getProfileType()
      Returns:
      Since:
      5.2
    • getInventory

      @NotNull public org.bukkit.inventory.Inventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder