Class ItemReward
java.lang.Object
com.Moshu.TreasureHunt.Components.Rewards.ItemReward
Represents an item reward that can be given to players during treasure hunts.
This class manages the configuration and distribution of item rewards,
supporting various item types including vanilla items, custom items from
ItemsAdder, Oraxen, Nexo, and MMOItems.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
int
int
org.bukkit.inventory.ItemStack
Fetches the ItemReward object from the config and integrates with custom item plugins to retrieve the final custom ItemStack.getLore()
getName()
getRange()
int
boolean
boolean
boolean
isNexo()
boolean
isOraxen()
boolean
isTopX
(int currentTop) void
setAmount
(int amount) void
setChance
(int chance) void
setEnchants
(List<String> enchants) void
setIdentifier
(String identifier) void
setItemString
(String item) void
void
setMenuItem
(String menuItem) void
void
void
setRewardToTopX
(int rewardToTopX) boolean
-
Constructor Details
-
ItemReward
public ItemReward()
-
-
Method Details
-
getIdentifier
-
setIdentifier
-
getItemId
-
setItemString
-
getRewardToTopX
public int getRewardToTopX() -
setRewardToTopX
public void setRewardToTopX(int rewardToTopX) -
isTopX
public boolean isTopX(int currentTop) -
shouldGiveOnlyToTopX
public boolean shouldGiveOnlyToTopX() -
getName
-
setName
-
getLore
-
setLore
-
setEnchants
-
getAmount
public int getAmount() -
setAmount
public void setAmount(int amount) -
getChance
public int getChance() -
setChance
public void setChance(int chance) -
getRange
-
setRange
-
getMenuItem
-
setMenuItem
-
isMMOItem
public boolean isMMOItem() -
isOraxen
public boolean isOraxen() -
isNexo
public boolean isNexo() -
isItemsAdder
public boolean isItemsAdder() -
build
-
getItemStack
public org.bukkit.inventory.ItemStack getItemStack()Fetches the ItemReward object from the config and integrates with custom item plugins to retrieve the final custom ItemStack.- Returns:
- the Bukkit ItemStack for this ItemReward
-