Skill tree folder renamed

This commit is contained in:
Indyuce 2022-11-10 17:07:39 +01:00
parent 79932d8306
commit 45540f3782
10 changed files with 12 additions and 12 deletions

View File

@ -277,8 +277,8 @@ public class MMOCore extends JavaPlugin {
commandMap.register("mmocore", new PartyCommand(config.getConfigurationSection("party"))); commandMap.register("mmocore", new PartyCommand(config.getConfigurationSection("party")));
if (config.contains("guild")) if (config.contains("guild"))
commandMap.register("mmocore", new GuildCommand(config.getConfigurationSection("guild"))); commandMap.register("mmocore", new GuildCommand(config.getConfigurationSection("guild")));
if (config.contains("skill-tree")) if (config.contains("skill-trees"))
commandMap.register("mmocore", new SkillTreeCommand(config.getConfigurationSection("skill-tree"))); commandMap.register("mmocore", new SkillTreeCommand(config.getConfigurationSection("skill-trees")));
if (hasEconomy() && economy.isValid()) { if (hasEconomy() && economy.isValid()) {
if (config.contains("withdraw")) if (config.contains("withdraw"))
commandMap.register("mmocore", new WithdrawCommand(config.getConfigurationSection("withdraw"))); commandMap.register("mmocore", new WithdrawCommand(config.getConfigurationSection("withdraw")));

View File

@ -25,7 +25,7 @@ public class SkillTreeCommand extends BukkitCommand {
if (!(sender instanceof Player player)) if (!(sender instanceof Player player))
return false; return false;
PlayerData data = PlayerData.get(player); PlayerData data = PlayerData.get(player);
MMOCommandEvent event = new MMOCommandEvent(data, "skilltree"); MMOCommandEvent event = new MMOCommandEvent(data, "skilltrees");
Bukkit.getServer().getPluginManager().callEvent(event); Bukkit.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) if (event.isCancelled())
return true; return true;

View File

@ -76,12 +76,12 @@ public class ConfigManager {
loadDefaultFile("expcurves", "mining.txt"); loadDefaultFile("expcurves", "mining.txt");
} }
if(!new File(MMOCore.plugin.getDataFolder()+"/skilltree").exists()) { if(!new File(MMOCore.plugin.getDataFolder()+"/skill-trees").exists()) {
loadDefaultFile("skilltree","combat.yml"); loadDefaultFile("skill-trees","combat.yml");
loadDefaultFile("skilltree","mage-arcane-mage.yml"); loadDefaultFile("skill-trees","mage-arcane-mage.yml");
loadDefaultFile("skilltree","rogue-marksman.yml"); loadDefaultFile("skill-trees","rogue-marksman.yml");
loadDefaultFile("skilltree","warrior-paladin.yml"); loadDefaultFile("skill-trees","warrior-paladin.yml");
loadDefaultFile("skilltree","general.yml"); loadDefaultFile("skill-trees","general.yml");
} }

View File

@ -57,7 +57,7 @@ public class SkillTreeManager extends MMOCoreRegister<SkillTree> {
public void initialize(boolean clearBefore) { public void initialize(boolean clearBefore) {
if (clearBefore) if (clearBefore)
registered.clear(); registered.clear();
File file = new File(MMOCore.plugin.getDataFolder() + "/skilltree"); File file = new File(MMOCore.plugin.getDataFolder() + "/skill-trees");
if (!file.exists()) if (!file.exists())
file.mkdirs(); file.mkdirs();
load(file); load(file);

View File

@ -28,8 +28,8 @@ guild:
withdraw: withdraw:
main: "withdraw" main: "withdraw"
aliases: ["w"] aliases: ["w"]
skill-tree: skill-trees:
main: "skilltree" main: "skilltrees"
aliase: ["st"] aliase: ["st"]
deposit: deposit:
main: "deposit" main: "deposit"