From a363bc6606ea09ed0b5c85b03ac3a3f723dfb289 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Fri, 20 Aug 2021 18:24:23 +0200 Subject: [PATCH] fixed a sound issue --- src/main/java/net/Indyuce/mmocore/api/SoundObject.java | 2 +- .../mmocore/comp/mythicmobs/skill/MythicMobSkill.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/api/SoundObject.java b/src/main/java/net/Indyuce/mmocore/api/SoundObject.java index 324f5d5e..0d1a0ec3 100644 --- a/src/main/java/net/Indyuce/mmocore/api/SoundObject.java +++ b/src/main/java/net/Indyuce/mmocore/api/SoundObject.java @@ -13,7 +13,7 @@ public class SoundObject { if(split.length > 2) { input = split[0]; volume = Float.parseFloat(split[1]); - pitch = Float.parseFloat(split[1]); + pitch = Float.parseFloat(split[2]); } else { volume = 1; pitch = 1; diff --git a/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/skill/MythicMobSkill.java b/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/skill/MythicMobSkill.java index 1d36b533..7186107f 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/skill/MythicMobSkill.java +++ b/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/skill/MythicMobSkill.java @@ -90,13 +90,16 @@ public class MythicMobSkill extends Skill { AbstractEntity trigger = BukkitAdapter.adapt(caster.getPlayer()); SkillCaster skillCaster = new GenericCaster(trigger); - io.lumine.xikage.mythicmobs.skills.SkillMetadata skillMeta = new io.lumine.xikage.mythicmobs.skills.SkillMetadata(SkillTrigger.API, skillCaster, trigger, BukkitAdapter.adapt(caster.getPlayer().getLocation()), targetEntities, targetLocations, 1); + io.lumine.xikage.mythicmobs.skills.SkillMetadata skillMeta = new io.lumine.xikage.mythicmobs.skills.SkillMetadata(SkillTrigger.CAST, skillCaster, trigger, BukkitAdapter.adapt(caster.getPlayer().getLocation()), targetEntities, targetLocations, 1); // Disable anticheat if (MMOCore.plugin.hasAntiCheat()) MMOCore.plugin.antiCheatSupport.disableAntiCheat(caster.getPlayer(), antiCheat); - if (this.skill.usable(skillMeta, SkillTrigger.API)) + /* + * Yo is that me or the second argument is f***ing useless + */ + if (this.skill.usable(skillMeta, SkillTrigger.CAST)) this.skill.execute(skillMeta); else cast.abort();