use of au.com.mineauz.minigames.config.RewardsFlag in project Minigames by AddstarMC.
the class MinigameData method loadRewardSigns.
public void loadRewardSigns() {
if (rewardSignsSave == null)
loadRewardSignsFile();
FileConfiguration cfg = rewardSignsSave.getConfig();
Set<String> keys = cfg.getKeys(false);
for (String id : keys) {
RewardsFlag rew = new RewardsFlag(new Rewards(), id);
rew.loadValue("", cfg);
rewardSigns.put(id, rew);
}
}
use of au.com.mineauz.minigames.config.RewardsFlag in project Minigames by AddstarMC.
the class MinigameData method addRewardSign.
public void addRewardSign(Location loc) {
RewardsFlag flag = new RewardsFlag(new Rewards(), MinigameUtils.createLocationID(loc));
rewardSigns.put(MinigameUtils.createLocationID(loc), flag);
}
use of au.com.mineauz.minigames.config.RewardsFlag in project Minigames by AddstarMC.
the class MinigameData method saveRewardSign.
public void saveRewardSign(String id, boolean save) {
RewardsFlag reward = rewardSigns.get(id);
if (rewardSignsSave == null)
loadRewardSignsFile();
FileConfiguration cfg = rewardSignsSave.getConfig();
cfg.set(id, null);
reward.saveValue("", cfg);
if (save) {
rewardSignsSave.saveConfig();
rewardSignsSave = null;
}
}
Aggregations