Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void counter(String shopname) {
- File shopfile = new File("plugins/AsylumCloudMain/Shops/", shopname + ".yml");
- FileConfiguration config = YamlConfiguration.loadConfiguration(shopfile);
- config.set("shop.reset-timer", config.getInt("shop.reset-timer") - 1);
- try {
- config.save(shopfile);
- } catch (IOException e) {
- e.printStackTrace();
- }
- if (config.getInt("shop.timer") == config.getInt("shop.reset-timer")) {
- if (shopname == "Rare") {
- // update items
- config.set("shop.reset-timer", 259200);
- try {
- config.save(minefile);
- } catch (IOException e) {
- e.printStackTrace();
- }
- } else if (shopname == "Common") {
- // update items
- config.set("shop.reset-timer", 86400);
- try {
- config.save(minefile);
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement