1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

Generate new jobConfig file at reload when removed

- Cod has internal ID and should work, #459
This commit is contained in:
montlikadani 2019-06-24 15:02:01 +02:00
parent f8519abfa1
commit a6b3b42da4
3 changed files with 7 additions and 3 deletions

View File

@ -124,7 +124,7 @@
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.2</version>
<version>2.10.3</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -133,7 +133,7 @@ public class ItemManager {
/**
* Gets the item by material
*
* @deprecated Use {@link #getItem(Material)}
* @deprecated Use {@link #getItem(ItemStack)}
* @param mat Material
* @return {@link CMIItemStack}
*/
@ -829,12 +829,12 @@ public class ItemManager {
LLAMA(103, "Llama"),
LLAMA_SPIT(104, "Llama Spit"),
PARROT(105, "Parrot"),
COD(112, "Cod"),
VILLAGER(120, "Villager"),
ENDER_CRYSTAL(200, "End Crystal"),
TURTLE(901, "Turtle"),
PHANTOM(902, "Phantom"),
TRIDENT(903, "Trident"),
COD(904, "Cod"),
SALMON(905, "Salmon"),
PUFFERFISH(906, "Pufferfish"),
TROPICAL_FISH(907, "Tropical Fish"),

View File

@ -394,6 +394,10 @@ public class ConfigManager {
*/
private void loadJobSettings() throws IOException {
File f = new File(Jobs.getFolder(), "jobConfig.yml");
if (!f.exists()) {
YmlMaker jobConfig = new YmlMaker(Jobs.getInstance(), "jobConfig.yml");
jobConfig.saveDefaultConfig();
}
InputStreamReader s = new InputStreamReader(new FileInputStream(f), "UTF-8");
ArrayList<Job> jobs = new ArrayList<>();