Package valorless.havenbags.hooks
Class CustomRecipes.BagInfo
java.lang.Object
valorless.havenbags.hooks.CustomRecipes.BagInfo
- Enclosing class:
- CustomRecipes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Material
Getter for material.int
Getter for custom model data.org.bukkit.entity.Player
Getter for player.int
getSize()
Getter for size.boolean
Getter for canBind.void
setCanBind
(boolean canBind) Setter for canBind.void
setMaterial
(org.bukkit.Material material) Setter for material.void
setModelData
(int modelData) Setter for custom model data.void
setPlayer
(org.bukkit.entity.Player player) Setter for player.void
setSize
(int size) Setter for size.void
setTexture
(String texture)
-
Constructor Details
-
BagInfo
public BagInfo()Default constructor. Initializes a new BagInfo object with default values: mat as Material.PLAYER_HEAD, size as 1, canBind as true, player as null, and customModelData as 0. -
BagInfo
public BagInfo(org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.Material material, @NotNull @org.jetbrains.annotations.NotNull int size, @NotNull @org.jetbrains.annotations.NotNull boolean bind, String texture) Parameterized constructor. Initializes a BagInfo object with specified player, material, size, and binding capability.- Parameters:
player
- the Player object, can be nullmaterial
- the Material type for the bagsize
- the size of the bag (clamped between 1 and 6)bind
- true if the bag can be bound, false otherwisetexture
- the head texture (base64), can be null
-
-
Method Details
-
getMaterial
public org.bukkit.Material getMaterial()Getter for material.- Returns:
- the Material assigned to the bag.
-
setMaterial
public void setMaterial(org.bukkit.Material material) Setter for material. Sets the Material for the bag.- Parameters:
material
- the Material to set for the bag.
-
getSize
public int getSize()Getter for size.- Returns:
- the current size of the bag.
-
setSize
public void setSize(int size) Setter for size. Sets the size of the bag. The value is clamped between 1 and 6.- Parameters:
size
- the size to set for the bag.
-
isCanBind
public boolean isCanBind()Getter for canBind.- Returns:
- true if the bag can be bound, false otherwise.
-
setCanBind
public void setCanBind(boolean canBind) Setter for canBind. Sets whether the bag can be bound.- Parameters:
canBind
- true if the bag can be bound, false otherwise.
-
getPlayer
public org.bukkit.entity.Player getPlayer()Getter for player.- Returns:
- the Player object associated with the bag, can be null.
-
setPlayer
public void setPlayer(org.bukkit.entity.Player player) Setter for player. Sets the Player object for placeholder parsing, can be null.- Parameters:
player
- the Player to associate with the bag.
-
getModelData
public int getModelData()Getter for custom model data.- Returns:
- the custom model data value.
-
setModelData
public void setModelData(int modelData) Setter for custom model data. Sets the custom model data value.- Parameters:
modelData
- the custom model data to set.
-
getTexture
-
setTexture
- Throws:
Exception
-