From 3ce77fe7e1a8d7f3802b42bd9000dbbcc3230fd6 Mon Sep 17 00:00:00 2001 From: Driftay Date: Wed, 18 Sep 2019 07:47:03 -0400 Subject: [PATCH] Fixed Shop Items Sowwy :) --- .../factions/shop/ShopConfig.java | 3 ++ src/main/resources/shop.yml | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 src/main/resources/shop.yml diff --git a/src/main/java/com/massivecraft/factions/shop/ShopConfig.java b/src/main/java/com/massivecraft/factions/shop/ShopConfig.java index 492d2cbb..6cbe1173 100644 --- a/src/main/java/com/massivecraft/factions/shop/ShopConfig.java +++ b/src/main/java/com/massivecraft/factions/shop/ShopConfig.java @@ -34,6 +34,7 @@ public class ShopConfig { if (!shop.exists()) { try { shop.createNewFile(); + getShop().set("prefix", "&4&lFactionShop&8» &7Purchased &f%item% &7for &b%points% Points&7!"); getShop().set("items.1.slot", 1); getShop().set("items.1.block", "STONE"); @@ -51,6 +52,8 @@ public class ShopConfig { } catch (IOException e) { e.printStackTrace(); } + } else { + s.options().copyDefaults(true); } } } diff --git a/src/main/resources/shop.yml b/src/main/resources/shop.yml new file mode 100644 index 00000000..da121aeb --- /dev/null +++ b/src/main/resources/shop.yml @@ -0,0 +1,28 @@ +####################################################################################### +####################################################################################### +####################################################################################### +##### ##### +##### SaberFactions Shop Configuration File ##### +##### ##### +##### ##### +####################################################################################### +####################################################################################### +####################################################################################### +#<-------------------------------------->NOTES<--------------------------------------># +#All Color Codes Can Be Used! +#Refer to: https://wiki.ess3.net/mc/ +#Enable and Disable Any Feature by Simply Switching Variable to true or false! +#<-------------------------------------->NOTES<--------------------------------------># +prefix: '&4&lFactionShop&8» &7Purchased &f%item% &7for &b%points% Points&7!' +items: + '1': + slot: 1 + block: STONE + name: '&aTest Shop' + lore: #{cost} is the placeholder for the cost of the item. + - '&cFully Customizable Lore!' + - '&b{cost} &7Points' + cmds: + - broadcast %player% bought Test Shop! + cost: 5 + glowing: true \ No newline at end of file