Class RewardHandler
java.lang.Object
com.bencodez.advancedcore.api.rewards.RewardHandler
The Class RewardHandler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDirectlyDefined(DirectlyDefinedReward directlyDefinedReward) voidvoidaddInjectedReward(RewardInject inject) voidvoidaddRewardFolder(File file) voidaddRewardFolder(File file, boolean load, boolean create) voidaddSubDirectlyDefined(SubDirectlyDefinedReward subDirectlyDefinedReward) voidaddValidPath(String path) voidvoidvoidvoidcheckSubRewards(DefinedReward direct) Gets the default folder.getDirectlyDefined(String path) Gets the reward.getReward(org.bukkit.configuration.ConfigurationSection data, String path, RewardOptions rewardOptions) getRewardDirectlyDefined(String reward) getRewardFiles(File folder) Gets the reward files.getRewardNames(File file) Gets the reward names.Gets the rewards.getSubDirectlyDefined(String path) voidgiveChoicesReward(Reward mainReward, AdvancedCoreUser user, String choice) voidgiveReward(AdvancedCoreUser user, Reward reward, RewardOptions rewardOptions) voidgiveReward(AdvancedCoreUser user, String reward, RewardOptions rewardOptions) voidgiveReward(AdvancedCoreUser user, org.bukkit.configuration.ConfigurationSection data, String path, RewardOptions rewardOptions) booleanhasDirectRewardHandle(String reward) booleanhasRewards(org.bukkit.configuration.file.FileConfiguration data, String path) voidvoidvoidLoad rewards.voidopenSubReward(org.bukkit.entity.Player player, String path, RewardEditData reward) booleanrewardExist(String reward) Reward exist.voidsetDefaultFolder(File defaultFolder) Sets the default folder.voidSetup example.voidshutdown()voidvoidvoidstartup()voidupdateReward(Reward reward) voidupdateReward(org.bukkit.configuration.Configuration data, String path, RewardOptions rewardOptions)
-
Constructor Details
-
RewardHandler
-
-
Method Details
-
addDirectlyDefined
-
addInjectedRequirements
-
addInjectedReward
-
addPlaceholder
-
addRewardFolder
-
addRewardFolder
-
addSubDirectlyDefined
-
addValidPath
-
checkDirectlyDefinedRewardFiles
public void checkDirectlyDefinedRewardFiles() -
checkDirectlyDefined
public void checkDirectlyDefined() -
checkSubRewards
public void checkSubRewards() -
checkSubRewards
-
getDefaultFolder
Gets the default folder.- Returns:
- the default folder
-
getDirectlyDefined
-
getReward
public Reward getReward(org.bukkit.configuration.ConfigurationSection data, String path, RewardOptions rewardOptions) -
getReward
Gets the reward.- Parameters:
reward- the reward- Returns:
- the reward
-
getRewardDirectlyDefined
-
getRewardFiles
Gets the reward files.- Parameters:
folder- the folder- Returns:
- the reward files
-
getRewardNames
Gets the reward names.- Parameters:
file- the file- Returns:
- the reward names
-
getRewards
Gets the rewards.- Returns:
- the rewards
-
getSubDirectlyDefined
-
giveChoicesReward
-
giveReward
public void giveReward(AdvancedCoreUser user, org.bukkit.configuration.ConfigurationSection data, String path, RewardOptions rewardOptions) -
giveReward
-
giveReward
-
hasDirectRewardHandle
-
hasRewards
-
loadInjectedRequirements
public void loadInjectedRequirements() -
loadInjectedRewards
public void loadInjectedRewards() -
loadRewards
public void loadRewards()Load rewards. -
openSubReward
-
rewardExist
Reward exist.- Parameters:
reward- the reward- Returns:
- true, if successful
-
setDefaultFolder
Sets the default folder.- Parameters:
defaultFolder- the new default folder
-
setupExample
public void setupExample()Setup example. -
shutdown
public void shutdown() -
sortInjectedRequirements
public void sortInjectedRequirements() -
sortInjectedRewards
public void sortInjectedRewards() -
startup
public void startup() -
updateReward
public void updateReward(org.bukkit.configuration.Configuration data, String path, RewardOptions rewardOptions) -
updateReward
-