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")));
if (config.contains("guild"))
commandMap.register("mmocore", new GuildCommand(config.getConfigurationSection("guild")));
if (config.contains("skill-tree"))
commandMap.register("mmocore", new SkillTreeCommand(config.getConfigurationSection("skill-tree")));
if (config.contains("skill-trees"))
commandMap.register("mmocore", new SkillTreeCommand(config.getConfigurationSection("skill-trees")));
if (hasEconomy() && economy.isValid()) {
if (config.contains("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))
return false;
PlayerData data = PlayerData.get(player);
MMOCommandEvent event = new MMOCommandEvent(data, "skilltree");
MMOCommandEvent event = new MMOCommandEvent(data, "skilltrees");
Bukkit.getServer().getPluginManager().callEvent(event);
if (event.isCancelled())
return true;

View File

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

View File

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

View File

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