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 Summary
ConstructorsConstructorDescriptionModifiableInventoryHolder
(org.bukkit.OfflinePlayer targetPlayer, String worldName, ProfileType profileType) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.Inventory
org.bukkit.OfflinePlayer
-
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
- Returns:
- Since:
- 5.2
-
getProfileType
- Returns:
- Since:
- 5.2
-
getInventory
@NotNull public org.bukkit.inventory.Inventory getInventory()- Specified by:
getInventory
in interfaceorg.bukkit.inventory.InventoryHolder
-