Class TexturedInventoryWrapper
java.lang.Object
dev.lone.itemsadder.api.FontImages.TexturedInventoryWrapper
Helper for creating inventories with font-image based textures in the title.
-
Constructor Summary
ConstructorsConstructorDescriptionTexturedInventoryWrapper(@Nullable InventoryHolder owner, int size, int textureOffset, FontImageWrapper... textures) Creates a textured inventory with one or more textures and no title text.TexturedInventoryWrapper(@Nullable InventoryHolder owner, int size, FontImageWrapper texture, int textureOffset) Creates a textured inventory with a single texture and no title text.TexturedInventoryWrapper(@Nullable InventoryHolder owner, int size, String title, int titleOffset, int textureOffset, FontImageWrapper... textures) Creates a textured inventory with one or more textures.TexturedInventoryWrapper(@Nullable InventoryHolder owner, int size, String title, FontImageWrapper texture) Deprecated.use constructors that explicitly accept title and texture offsets.TexturedInventoryWrapper(@Nullable InventoryHolder owner, int size, String title, FontImageWrapper texture, int titleOffset) Deprecated.use constructors that explicitly accept title and texture offsets.TexturedInventoryWrapper(@Nullable InventoryHolder owner, int size, String title, FontImageWrapper texture, int titleOffset, int textureOffset) Creates a textured inventory with a single texture.TexturedInventoryWrapper(@Nullable InventoryHolder owner, @NotNull InventoryType type, int textureOffset, FontImageWrapper... textures) Creates a typed textured inventory with one or more textures and no title text.TexturedInventoryWrapper(@Nullable InventoryHolder owner, @NotNull InventoryType type, String title, int titleOffset, int textureOffset, FontImageWrapper... textures) Creates a textured inventory of a Bukkit inventory type with one or more textures.TexturedInventoryWrapper(@Nullable InventoryHolder owner, @NotNull InventoryType type, String title, FontImageWrapper texture) Deprecated.use constructors that explicitly accept title and texture offsets.TexturedInventoryWrapper(@Nullable InventoryHolder owner, @NotNull InventoryType type, String title, FontImageWrapper texture, int titleOffset) Deprecated.use constructors that explicitly accept title and texture offsets.TexturedInventoryWrapper(@Nullable InventoryHolder owner, @NotNull InventoryType type, String title, FontImageWrapper texture, int titleOffset, int textureOffset) Creates a textured inventory with a single texture. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.this exposes the internal inventory directly.static voidsetPlayerInventoryTexture(Player player, FontImageWrapper texture) Changes the texture of the inventory currently open for a player.static voidsetPlayerInventoryTexture(Player player, FontImageWrapper texture, int titleOffset) Changes the texture of the inventory currently open for a player.static voidsetPlayerInventoryTexture(Player player, FontImageWrapper texture, String title) Changes the texture of the inventory currently open for a player.static voidsetPlayerInventoryTexture(Player player, FontImageWrapper texture, String title, int titleOffset, int textureOffset) Changes the texture of the inventory currently open for a player.voidshowInventory(Player player) Opens this textured inventory for a player.
-
Constructor Details
-
TexturedInventoryWrapper
public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, int size, String title, int titleOffset, int textureOffset, FontImageWrapper... textures) Creates a textured inventory with one or more textures.- Parameters:
owner- the inventory owner, or null.size- the inventory size.title- the visible title text, or null.titleOffset- the title pixel offset.textureOffset- the texture pixel offset.textures- the textures to render in the title.
-
TexturedInventoryWrapper
public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, @NotNull @NotNull InventoryType type, String title, int titleOffset, int textureOffset, FontImageWrapper... textures) Creates a textured inventory of a Bukkit inventory type with one or more textures.- Parameters:
owner- the inventory owner, or null.type- the inventory type.title- the visible title text, or null.titleOffset- the title pixel offset.textureOffset- the texture pixel offset.textures- the textures to render in the title.
-
TexturedInventoryWrapper
public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, int size, int textureOffset, FontImageWrapper... textures) Creates a textured inventory with one or more textures and no title text.- Parameters:
owner- the inventory owner, or null.size- the inventory size.textureOffset- the texture pixel offset.textures- the textures to render in the title.
-
TexturedInventoryWrapper
public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, @NotNull @NotNull InventoryType type, int textureOffset, FontImageWrapper... textures) Creates a typed textured inventory with one or more textures and no title text.- Parameters:
owner- the inventory owner, or null.type- the inventory type.textureOffset- the texture pixel offset.textures- the textures to render in the title.
-
TexturedInventoryWrapper
public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, @NotNull @NotNull InventoryType type, String title, FontImageWrapper texture, int titleOffset, int textureOffset) Creates a textured inventory with a single texture.- Parameters:
owner- the inventory owner, or null.type- the inventory type.title- the visible title text, or null.texture- the texture to render in the title.titleOffset- the title pixel offset.textureOffset- the texture pixel offset.
-
TexturedInventoryWrapper
public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, int size, String title, FontImageWrapper texture, int titleOffset, int textureOffset) Creates a textured inventory with a single texture.- Parameters:
owner- the inventory owner, or null.size- the inventory size.title- the visible title text, or null.texture- the texture to render in the title.titleOffset- the title pixel offset.textureOffset- the texture pixel offset.
-
TexturedInventoryWrapper
public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, int size, FontImageWrapper texture, int textureOffset) Creates a textured inventory with a single texture and no title text.- Parameters:
owner- the inventory owner, or null.size- the inventory size.texture- the texture to render in the title.textureOffset- the texture pixel offset.
-
TexturedInventoryWrapper
@Deprecated public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, @NotNull @NotNull InventoryType type, String title, FontImageWrapper texture) Deprecated.use constructors that explicitly accept title and texture offsets.Creates a typed textured inventory with default offsets. -
TexturedInventoryWrapper
@Deprecated public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, @NotNull @NotNull InventoryType type, String title, FontImageWrapper texture, int titleOffset) Deprecated.use constructors that explicitly accept title and texture offsets.Creates a typed textured inventory with default texture offset. -
TexturedInventoryWrapper
@Deprecated public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, int size, String title, FontImageWrapper texture) Deprecated.use constructors that explicitly accept title and texture offsets.Creates a textured inventory with default offsets. -
TexturedInventoryWrapper
@Deprecated public TexturedInventoryWrapper(@Nullable @Nullable InventoryHolder owner, int size, String title, FontImageWrapper texture, int titleOffset) Deprecated.use constructors that explicitly accept title and texture offsets.Creates a textured inventory with default texture offset.
-
-
Method Details
-
setPlayerInventoryTexture
Changes the texture of the inventory currently open for a player.- Parameters:
player- the player.texture- the texture to render in the title.title- the visible title text, or null to keep the current title.
-
setPlayerInventoryTexture
Changes the texture of the inventory currently open for a player.- Parameters:
player- the player.texture- the texture to render in the title.
-
setPlayerInventoryTexture
public static void setPlayerInventoryTexture(Player player, FontImageWrapper texture, int titleOffset) Changes the texture of the inventory currently open for a player.- Parameters:
player- the player.texture- the texture to render in the title.titleOffset- the title pixel offset.
-
setPlayerInventoryTexture
public static void setPlayerInventoryTexture(Player player, FontImageWrapper texture, String title, int titleOffset, int textureOffset) Changes the texture of the inventory currently open for a player.- Parameters:
player- the player.texture- the texture to render in the title.title- the visible title text, or null to keep the current title.titleOffset- the title pixel offset.textureOffset- the texture pixel offset.
-
getInternal
Deprecated.this exposes the internal inventory directly.Gets the internal Bukkit inventory.- Returns:
- the internal inventory.
-
showInventory
Opens this textured inventory for a player.- Parameters:
player- the player.
-