mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-31 06:07:34 +01:00
Merge branch 'additional_profession_experience' into 'master'
Additional Profession Experience Stat See merge request mythiccraft/mmoitems!8
This commit is contained in:
commit
19f0fa51f9
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.Indyuce</groupId>
|
||||
<artifactId>MMOItems</artifactId>
|
||||
<version>6.7-SNAPSHOT</version>
|
||||
<version>6.7.1-SNAPSHOT</version>
|
||||
<name>MMOItems</name>
|
||||
<description>A great item solution for your RPG server!!</description>
|
||||
|
||||
|
@ -1,33 +1,45 @@
|
||||
package net.Indyuce.mmoitems.comp.mmocore;
|
||||
|
||||
import io.lumine.mythic.lib.version.VersionMaterial;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.event.PlayerChangeClassEvent;
|
||||
import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent;
|
||||
import net.Indyuce.mmocore.api.event.PlayerResourceUpdateEvent;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.api.player.attribute.PlayerAttribute;
|
||||
import net.Indyuce.mmocore.api.player.stats.StatType;
|
||||
import net.Indyuce.mmocore.experience.Profession;
|
||||
import net.Indyuce.mmoitems.MMOItems;
|
||||
import net.Indyuce.mmoitems.api.player.RPGPlayer;
|
||||
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;
|
||||
import net.Indyuce.mmoitems.stat.type.DoubleStat;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class MMOCoreHook implements RPGHandler, Listener {
|
||||
|
||||
/**
|
||||
* Called when MMOItems enables
|
||||
* <p>
|
||||
* These stats are only updated on a server reload because that
|
||||
* class has to be instanciated again for the registered stats to update
|
||||
* class has to be instantiated again for the registered stats to update
|
||||
*/
|
||||
public MMOCoreHook() {
|
||||
for (PlayerAttribute attribute : MMOCore.plugin.attributeManager.getAll())
|
||||
MMOItems.plugin.getStats().register(new Required_Attribute(attribute));
|
||||
for (Profession profession : MMOCore.plugin.professionManager.getAll())
|
||||
for (Profession profession : MMOCore.plugin.professionManager.getAll()) {
|
||||
|
||||
MMOItems.plugin.getStats().register(new DoubleStat((StatType.ADDITIONAL_EXPERIENCE.name() + '_' + profession.getId())
|
||||
.replace('-', '_').replace(' ', '_').toUpperCase(Locale.ROOT),
|
||||
VersionMaterial.EXPERIENCE_BOTTLE.toMaterial(), profession.getName() + ' ' + "Additional Experience (MMOCore)"
|
||||
, new String[]{"Additional MMOCore profession " + profession.getName() + " experience in %."}, new String[]{"!block", "all"}));
|
||||
|
||||
MMOItems.plugin.getStats().register(new Required_Profession(profession));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -98,6 +98,14 @@ lore-format:
|
||||
- '#repair-percent#'
|
||||
- '#item-cooldown#'
|
||||
- '#additional-experience#'
|
||||
- '#additional-experience-alchemy#'
|
||||
- '#additional-experience-enchanting#'
|
||||
- '#additional-experience-farming#'
|
||||
- '#additional-experience-fishing#'
|
||||
- '#additional-experience-mining#'
|
||||
- '#additional-experience-smelting#'
|
||||
- '#additional-experience-smithing#'
|
||||
- '#additional-experience-woodcutting#'
|
||||
- '#cooldown-reduction#'
|
||||
- '#mana-cost#'
|
||||
- '#stamina-cost#'
|
||||
|
@ -64,6 +64,14 @@ max-stamina: '&3 &7■ Max Stamina: &f<plus>#'
|
||||
stamina-regeneration: '&3 &7■ Stamina Regeneration: &f<plus>#'
|
||||
cooldown-reduction: '&3 &7■ Skill Cooldown Reduction: &f<plus>#%'
|
||||
additional-experience: '&3 &7■ Additional Experience: &f<plus>#%'
|
||||
additional-experience-alchemy: '&7■ Additional Alchemy Experience: &f<plus>#%'
|
||||
additional-experience-enchanting: '&7■ Additional Enchanting Experience: &f<plus>#%'
|
||||
additional-experience-farming: '&7■ Additional Farming Experience: &f<plus>#%'
|
||||
additional-experience-fishing: '&7■ Additional Fishing Experience: &f<plus>#%'
|
||||
additional-experience-mining: '&7■ Additional Mining Experience: &f<plus>#%'
|
||||
additional-experience-smelting: '&7■ Additional Smelting Experience: &f<plus>#%'
|
||||
additional-experience-smithing: '&7■ Additional Smithing Experience: &f<plus>#%'
|
||||
additional-experience-woodcutting: '&7■ Additional Woodcutting Experience: &f<plus>#%'
|
||||
|
||||
# Extra Options
|
||||
perm-effect: '&3 &7■ Permanent &f#'
|
||||
|
Loading…
Reference in New Issue
Block a user