Class CommandReward
java.lang.Object
com.Moshu.TreasureHunt.Components.Rewards.CommandReward
Represents a command reward that can be executed for players during treasure hunts.
 This class manages the execution of console commands as rewards, with support
 for chance-based execution and top-X player targeting.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionintintbooleanisTopX(int currentTop) voidrun(org.bukkit.entity.Player p) Executes the command reward for the specified player.voidsetChance(int chance) voidsetCommand(String command) voidsetIdentifier(String identifier) voidsetMenuItem(String menuItem) voidsetRewardToTopX(int rewardToTopX) boolean 
- 
Constructor Details
- 
CommandReward
public CommandReward()Creates a new command reward with default values. 
 - 
 - 
Method Details
- 
getIdentifier
 - 
setIdentifier
 - 
setRewardToTopX
public void setRewardToTopX(int rewardToTopX)  - 
getRewardToTopX
public int getRewardToTopX() - 
shouldRewardToTopX
public boolean shouldRewardToTopX() - 
isTopX
public boolean isTopX(int currentTop)  - 
getCommand
 - 
setCommand
 - 
getChance
public int getChance() - 
setChance
public void setChance(int chance)  - 
getMenuItem
 - 
setMenuItem
 - 
run
public void run(org.bukkit.entity.Player p) Executes the command reward for the specified player. The command is executed with chance-based probability and player name replacement.- Parameters:
 p- The player to execute the command for
 
 -