diff --git a/pom.xml b/pom.xml index 61c9cd02..a89efa24 100644 --- a/pom.xml +++ b/pom.xml @@ -140,7 +140,7 @@ io.lumine MythicLib-dist - 1.3-R24-SNAPSHOT + 1.3-R25-SNAPSHOT provided diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index f9eb4c3f..1299fc17 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -101,7 +101,7 @@ public class MMOCore extends LuminePlugin { public boolean shouldDebugSQL = false; - private static final int MYTHICLIB_COMPATIBILITY_INDEX = 5; + private static final int MYTHICLIB_COMPATIBILITY_INDEX = 6; public MMOCore() { plugin = this; diff --git a/src/main/java/net/Indyuce/mmocore/skill/CastableSkill.java b/src/main/java/net/Indyuce/mmocore/skill/CastableSkill.java index d2cc4184..3e9991c7 100644 --- a/src/main/java/net/Indyuce/mmocore/skill/CastableSkill.java +++ b/src/main/java/net/Indyuce/mmocore/skill/CastableSkill.java @@ -6,6 +6,7 @@ import io.lumine.mythic.lib.player.cooldown.CooldownInfo; import io.lumine.mythic.lib.skill.Skill; import io.lumine.mythic.lib.skill.SkillMetadata; import io.lumine.mythic.lib.skill.handler.SkillHandler; +import io.lumine.mythic.lib.skill.trigger.TriggerType; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.event.PlayerResourceUpdateEvent; import net.Indyuce.mmocore.api.player.PlayerActivity; @@ -27,10 +28,11 @@ public class CastableSkill extends Skill { @Override public boolean getResult(SkillMetadata skillMeta) { PlayerData playerData = PlayerData.get(skillMeta.getCaster().getData().getUniqueId()); + boolean loud = !skill.getSkill().hasTrigger() || !skill.getSkill().getTrigger().isSilent(); // If the caster has unlocked that skill if (!playerData.hasSkillUnlocked(skill)) { - MMOCore.plugin.configManager.getSimpleMessage("not-unlocked-skill").send(playerData.getPlayer()); + if (loud) MMOCore.plugin.configManager.getSimpleMessage("not-unlocked-skill").send(playerData.getPlayer()); return false; } @@ -40,19 +42,19 @@ public class CastableSkill extends Skill { // Cooldown check if (skillMeta.getCaster().getData().getCooldownMap().isOnCooldown(this)) { - MMOCore.plugin.configManager.getSimpleMessage("casting.on-cooldown").send(playerData.getPlayer()); + if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.on-cooldown").send(playerData.getPlayer()); return false; } // Mana cost if (playerData.getMana() < getModifier("mana")) { - MMOCore.plugin.configManager.getSimpleMessage("casting.no-mana", "mana", playerData.getProfess().getManaDisplay().getName()).send(playerData.getPlayer()); + if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.no-mana", "mana", playerData.getProfess().getManaDisplay().getName()).send(playerData.getPlayer()); return false; } // Stamina cost if (playerData.getStamina() < getModifier("stamina")) { - MMOCore.plugin.configManager.getSimpleMessage("casting.no-stamina").send(playerData.getPlayer()); + if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.no-stamina").send(playerData.getPlayer()); return false; }