mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-03 06:37:47 +01:00
New stats to increase MMOCore attributes
This commit is contained in:
parent
a3e22eda66
commit
5a0f51331c
@ -12,6 +12,7 @@ import net.Indyuce.mmocore.experience.Profession;
|
||||
import net.Indyuce.mmoitems.MMOItems;
|
||||
import net.Indyuce.mmoitems.api.player.PlayerData;
|
||||
import net.Indyuce.mmoitems.api.player.RPGPlayer;
|
||||
import net.Indyuce.mmoitems.comp.mmocore.stat.ExtraAttribute;
|
||||
import net.Indyuce.mmoitems.comp.mmocore.stat.Required_Attribute;
|
||||
import net.Indyuce.mmoitems.comp.mmocore.stat.Required_Profession;
|
||||
import net.Indyuce.mmoitems.comp.rpg.RPGHandler;
|
||||
@ -30,8 +31,11 @@ public class MMOCoreHook implements RPGHandler, Listener {
|
||||
* class has to be instantiated again for the registered stats to update
|
||||
*/
|
||||
public MMOCoreHook() {
|
||||
for (PlayerAttribute attribute : MMOCore.plugin.attributeManager.getAll())
|
||||
for (PlayerAttribute attribute : MMOCore.plugin.attributeManager.getAll()) {
|
||||
MMOItems.plugin.getStats().register(new Required_Attribute(attribute));
|
||||
MMOItems.plugin.getStats().register(new ExtraAttribute(attribute));
|
||||
}
|
||||
|
||||
for (Profession profession : MMOCore.plugin.professionManager.getAll()) {
|
||||
|
||||
// Adds profession specific Additional Experience stats.
|
||||
|
@ -0,0 +1,13 @@
|
||||
package net.Indyuce.mmoitems.comp.mmocore.stat;
|
||||
|
||||
import net.Indyuce.mmocore.api.player.attribute.PlayerAttribute;
|
||||
import net.Indyuce.mmoitems.stat.type.DoubleStat;
|
||||
import org.bukkit.Material;
|
||||
|
||||
public class ExtraAttribute extends DoubleStat {
|
||||
public ExtraAttribute(PlayerAttribute attribute) {
|
||||
super("ADDITIONAL_" + attribute.getId().toUpperCase().replace("-", "_"), Material.LIME_DYE,
|
||||
"Additional " + attribute.getName() + " (MMOCore)", new String[]{"Amount of " + attribute.getName() + " points the player",
|
||||
"gets when holding/wearing this item."}, new String[]{"!block", "all"});
|
||||
}
|
||||
}
|
@ -101,6 +101,9 @@ lore-format:
|
||||
- '#item-cooldown#'
|
||||
- '#lifesteal#'
|
||||
- '#spell-vampirism#'
|
||||
- '#additional-dexterity#'
|
||||
- '#additional-strength#'
|
||||
- '#additional-intelligence#'
|
||||
- '#additional-experience#'
|
||||
- '#additional-experience-alchemy#'
|
||||
- '#additional-experience-enchanting#'
|
||||
|
@ -121,11 +121,15 @@ tier: '&3 &7Tier: #'
|
||||
required-class: '&3 &7# Item'
|
||||
required-level: '&eRequires Lvl #'
|
||||
|
||||
# Attributes
|
||||
# MMOCore Attributes
|
||||
required-dexterity: '&eRequires &c# &eDexterity'
|
||||
required-strength: '&eRequires &c# &eStrength'
|
||||
required-intelligence: '&eRequires &c# &eIntelligence'
|
||||
|
||||
additional-dexterity: '&3 &7■ Extra Dexterity: &f<plus>#'
|
||||
additional-strength: '&3 &7■ Extra Strength: &f<plus>#'
|
||||
additional-intelligence: '&3 &7■ Extra Intelligence: &f<plus>#'
|
||||
|
||||
# Professions
|
||||
profession-alchemy: '&eAlchemy Level: &c#'
|
||||
profession-enchanting: '&eEnchanting Level: &c#'
|
||||
|
Loading…
Reference in New Issue
Block a user