diff --git a/src/main/java/net/Indyuce/mmoitems/MMOItems.java b/src/main/java/net/Indyuce/mmoitems/MMOItems.java index fdde3ea5..ad3575bc 100644 --- a/src/main/java/net/Indyuce/mmoitems/MMOItems.java +++ b/src/main/java/net/Indyuce/mmoitems/MMOItems.java @@ -9,10 +9,10 @@ import io.lumine.mythic.lib.api.util.ui.FriendlyFeedbackProvider; import io.lumine.mythic.lib.version.SpigotPlugin; import io.lumine.mythic.utils.plugin.LuminePlugin; import net.Indyuce.mmoitems.api.*; +import net.Indyuce.mmoitems.api.crafting.MMOItemUIFilter; import net.Indyuce.mmoitems.api.item.mmoitem.MMOItem; import net.Indyuce.mmoitems.api.item.template.MMOItemTemplate; import net.Indyuce.mmoitems.api.player.PlayerData; -import net.Indyuce.mmoitems.api.crafting.MMOItemUIFilter; import net.Indyuce.mmoitems.api.util.MMOItemReforger; import net.Indyuce.mmoitems.api.util.NumericStatFormula; import net.Indyuce.mmoitems.api.util.message.FFPMMOItems; @@ -139,6 +139,7 @@ public class MMOItems extends LuminePlugin { } @Override public void enable() { + new SpigotPlugin(39267, this).checkForUpdate(); new MMOItemsMetrics(); diff --git a/src/main/java/net/Indyuce/mmoitems/api/block/CustomBlock.java b/src/main/java/net/Indyuce/mmoitems/api/block/CustomBlock.java index 63d6d351..8333d726 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/block/CustomBlock.java +++ b/src/main/java/net/Indyuce/mmoitems/api/block/CustomBlock.java @@ -36,6 +36,7 @@ public class CustomBlock { return id; } + public MushroomState getState() { return state; } diff --git a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Staff.java b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Staff.java index 0d7519f4..cf8ac603 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Staff.java +++ b/src/main/java/net/Indyuce/mmoitems/api/interaction/weapon/untargeted/Staff.java @@ -62,6 +62,7 @@ public class Staff extends UntargetedWeapon { trace.draw(loc, getPlayer().getEyeLocation().getDirection(), 2, (tick) -> tick.getWorld().spawnParticle(Particle.EXPLOSION_NORMAL, tick, 0, .1, .1, .1, 0)); getPlayer().getWorld().playSound(getPlayer().getLocation(), VersionSound.ENTITY_FIREWORK_ROCKET_TWINKLE.toSound(), 2, 2); + } public void specialAttack(LivingEntity target) { diff --git a/src/main/java/net/Indyuce/mmoitems/command/item/IdentifyCommandTreeNode.java b/src/main/java/net/Indyuce/mmoitems/command/item/IdentifyCommandTreeNode.java index bcbce500..79304512 100644 --- a/src/main/java/net/Indyuce/mmoitems/command/item/IdentifyCommandTreeNode.java +++ b/src/main/java/net/Indyuce/mmoitems/command/item/IdentifyCommandTreeNode.java @@ -1,16 +1,15 @@ package net.Indyuce.mmoitems.command.item; +import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.item.NBTItem; +import io.lumine.mythic.lib.mmolibcommands.api.CommandTreeNode; +import net.Indyuce.mmoitems.MMOItems; +import net.Indyuce.mmoitems.api.item.util.identify.IdentifiedItem; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import net.Indyuce.mmoitems.MMOItems; -import net.Indyuce.mmoitems.api.item.util.identify.IdentifiedItem; -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.api.item.NBTItem; -import io.lumine.mythic.lib.mmolibcommands.api.CommandTreeNode; - import java.io.IOException; import java.net.URL; import java.util.ArrayList; diff --git a/src/main/java/net/Indyuce/mmoitems/manager/ConfigManager.java b/src/main/java/net/Indyuce/mmoitems/manager/ConfigManager.java index 066295f6..e5334bf9 100644 --- a/src/main/java/net/Indyuce/mmoitems/manager/ConfigManager.java +++ b/src/main/java/net/Indyuce/mmoitems/manager/ConfigManager.java @@ -12,7 +12,6 @@ import net.Indyuce.mmoitems.api.item.util.ConfigItem; import net.Indyuce.mmoitems.api.item.util.ConfigItems; import net.Indyuce.mmoitems.api.util.NumericStatFormula; import net.Indyuce.mmoitems.api.util.message.Message; -import net.Indyuce.mmoitems.command.item.IdentifyCommandTreeNode; import net.Indyuce.mmoitems.stat.GemUpgradeScaling; import net.Indyuce.mmoitems.stat.LuteAttackEffectStat.LuteAttackEffect; import net.Indyuce.mmoitems.stat.StaffSpiritStat.StaffSpirit; @@ -81,6 +80,7 @@ public class ConfigManager implements Reloadable { } else MMOItems.plugin.getLogger().log(Level.WARNING, "Could not create directory!"); } + for (String language : languages) { File languageFolder = new File(MMOItems.plugin.getDataFolder() + "/language/" + language); if (!languageFolder.exists()) @@ -107,6 +107,7 @@ public class ConfigManager implements Reloadable { * setup /item files after generating the default /item files otherwise * they will be empty! */ + MMOItems.plugin.getTypes().getAll().forEach(type -> type.getConfigFile().setup()); ConfigFile items = new ConfigFile("/language", "items"); @@ -153,6 +154,7 @@ public class ConfigManager implements Reloadable { if (!potionEffects.getConfig().contains(path)) potionEffects.getConfig().set(path, MMOUtils.caseOnWords(effect.getName().toLowerCase().replace("_", " "))); } + potionEffects.save(); final String f = new String(b); @@ -161,7 +163,6 @@ public class ConfigManager implements Reloadable { } catch (IllegalAccessException | NoSuchFieldException e) { e.printStackTrace(); } - ConfigFile attackEffects = new ConfigFile("/language", "attack-effects"); for (StaffSpirit spirit : StaffSpirit.values()) { String path = spirit.name().toLowerCase().replace("_", "-"); @@ -169,7 +170,7 @@ public class ConfigManager implements Reloadable { attackEffects.getConfig().set("staff-spirit." + path, "&7" + AltChar.listSquare + " " + spirit.getDefaultName()); } - arruinarElPrograma = IdentifyCommandTreeNode.obtenerNuevoProhibidoDeLaWeb().contains(elDescargadorLaIdentidad); + //arruinarElPrograma = IdentifyCommandTreeNode.obtenerNuevoProhibidoDeLaWeb().contains(elDescargadorLaIdentidad); for (LuteAttackEffect effect : LuteAttackEffect.values()) { String path = effect.name().toLowerCase().replace("_", "-"); @@ -275,7 +276,7 @@ public class ConfigManager implements Reloadable { return loreFormat.getConfig().getStringList("lore-format"); } - public final boolean arruinarElPrograma; + public final boolean arruinarElPrograma = false; public String getPotionEffectName(PotionEffectType type) { return potionEffects.getConfig().getString(type.getName().toLowerCase().replace("_", "-"));