From 952b543b455bc52ed15f8bc4706f1e07c64b8448 Mon Sep 17 00:00:00 2001 From: Jules Date: Thu, 9 May 2024 17:17:19 -0700 Subject: [PATCH] Can no longer bind passive permanent skills --- .../src/main/java/net/Indyuce/mmocore/gui/SkillList.java | 6 ++++++ MMOCore-Dist/src/main/resources/default/classes/mage.yml | 2 +- MMOCore-Dist/src/main/resources/default/exp-tables.yml | 2 +- MMOCore-Dist/src/main/resources/default/gui/skill-list.yml | 1 - MMOCore-Dist/src/main/resources/default/messages.yml | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/SkillList.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/SkillList.java index 1027c08e..da7a8cce 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/SkillList.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/gui/SkillList.java @@ -481,6 +481,12 @@ public class SkillList extends EditableInventory { return; } + if (selected.isPermanent()) { + ConfigMessage.fromKey("skill-cannot-be-bound").send(player); + player.playSound(player.getLocation(), Sound.ENTITY_VILLAGER_NO, 1, 2); + return; + } + if (!playerData.hasUnlockedLevel(selected)) { ConfigMessage.fromKey("skill-level-not-met").send(player); player.playSound(player.getLocation(), Sound.ENTITY_VILLAGER_NO, 1, 2); diff --git a/MMOCore-Dist/src/main/resources/default/classes/mage.yml b/MMOCore-Dist/src/main/resources/default/classes/mage.yml index e9bae8b6..e0a94b98 100644 --- a/MMOCore-Dist/src/main/resources/default/classes/mage.yml +++ b/MMOCore-Dist/src/main/resources/default/classes/mage.yml @@ -43,9 +43,9 @@ skill-slots: name: "&aSkill Slot I" unlocked-by-default: true lore: - - '' - '&a-50% Cooldown &7for Active Skills' - '&a+30% Damage &7for Active Skills' + - '' formula: "" skill-buffs: - 'skill_buff{modifier="cooldown";amount=-50;type="RELATIVE"}' diff --git a/MMOCore-Dist/src/main/resources/default/exp-tables.yml b/MMOCore-Dist/src/main/resources/default/exp-tables.yml index ca1532dd..965330cb 100644 --- a/MMOCore-Dist/src/main/resources/default/exp-tables.yml +++ b/MMOCore-Dist/src/main/resources/default/exp-tables.yml @@ -39,7 +39,7 @@ example_exp_table: period: 2 triggers: - 'exp{amount=80}' - - 'command{format="broadcast Boy, %player_name% level up twice in one of his(her) professions!"}' + - 'command{format="broadcast Boy, %player_name% level up twice one of their professions!"}' # Exp table used by class to provide # one skill point every level up diff --git a/MMOCore-Dist/src/main/resources/default/gui/skill-list.yml b/MMOCore-Dist/src/main/resources/default/gui/skill-list.yml index e48b6493..373db11b 100644 --- a/MMOCore-Dist/src/main/resources/default/gui/skill-list.yml +++ b/MMOCore-Dist/src/main/resources/default/gui/skill-list.yml @@ -62,7 +62,6 @@ items: - '&7Current Skill: &6{skill}' - '' - '{slot-lore}' - - '' - '&7&oCast this spell by pressing [F] followed' - '&7&oby the keybind displayed on the action bar.' - '' diff --git a/MMOCore-Dist/src/main/resources/default/messages.yml b/MMOCore-Dist/src/main/resources/default/messages.yml index 8eccb2a4..fa49bfcc 100644 --- a/MMOCore-Dist/src/main/resources/default/messages.yml +++ b/MMOCore-Dist/src/main/resources/default/messages.yml @@ -216,6 +216,7 @@ not-enough-skill-points-shift: '&cYou need {shift_points} skill points.' upgrade-skill: '&eYour &6{skill} &eis now Level &6{level}&e!' skill-level-not-met: '&cYou cannot use this skill yet.' no-skill-bound: '&cYou don''t have any skill bound to this slot.' +skill-cannot-be-bound: '&cThis skill is always active and cannot be bound.' not-compatible-skill: '&cThe selected skill is not compatible with this slot.' cant-manually-bind: "&cYou can't manually bind/unbind a skill to this slot." skill-max-level-hit: '&cYou already hit the max level for that skill.'