⚔ Heroes Premium ⚔ BEST MINECRAFT & SPIGOT RPG PLUGIN EVER icon

⚔ Heroes Premium ⚔ BEST MINECRAFT & SPIGOT RPG PLUGIN EVER -----

The best class, race and skill Minecraft RPG plugin for Minecraft servers



Massive update with INSANE changes and PERFORMANCE!
# ==-- | **1.10 PREMIUM** | --==
This update is a MAJOR step forward for Heroes and the future of the plugin! A significant number of rewrites, optimisations and new features are present in this update as we finally jump to the new 1.10 mark. As always, please let us know if you encounter any issues with this new update.

**You MUST update all your skills for this latest version, otherwise the skills WILL NOT LOAD!**

**It is also recommended to backup your old damages.yml and then generate a new one! As there are new options configuration options available!**

## -- **Supported Minecraft Versions** --
1.13.X, 1.14.X, 1.15.X, 1.16.X, 1.17.X, 1.18.X, 1.19.X, 1.20.X

## -- **New Features** --
- damages.yml now contains the option `use-pvx-damage-multipliers`. Previously, this has always been true, where a class's pvp and pve modifiers are considered during damage calculations. If you do not use this feature then simply set it to false, which can minorly improve performance.
- damages.yml now contains the option `item-damage-priority`. This has 5 modes and controls what affects a Hero's dealt damage. Previously, the highest value of all classes (primary, secondary and race) was chosen. It is advised to select the option that best suits your needs, as if you only use a primary class for damage, then choose that since it significantly reduces the amount of calculations required therefore improving performance.

The available options are;
```
  • - highest (checks which value is the highest of the three classes)
  • - primary (only uses primary class, if no value exists use global damage, if no global damage exists, use vanilla)
  • - secondary (only uses secondary class, if no value exists use global damage, if no global damage exists, use vanilla)
  • - race (only uses race class, if no value exists use global damage, if no global damage exists, use vanilla)
  • - none (don't use class scaling, instead use global damage if it exists - and if it doesn't then use vanilla values.)

```
- A Hero's attributes are now available as variables through MythicMobs! This means using script skills, you can use per attribute increases for various skill variables. You can access a Hero's attribute using a format such as; `<caster.var.hero_strength>` or `<caster.var.hero_charisma>`
- Expansion for Placeholder API is now implemented directly into Heroes! So there is no need to use a separate expansion file!
- Added a new scriptable skill type for passives! This skill will essentially call a MythicMob skill when for when the passive is applied and for when it is removed. Since there are more than two types, a new option has been added to the configurations. **Please regenerate your script-skills.yml to see the new format and update your skills accordingly**

Example of a passive skill;
```
- name: FieryPresence
on-apply-mythic-skill-id: FieryPresence-Apply
on-remove-mythic-skill-id: FieryPresence-Remove
type: PASSIVE
skill-types: BUFFING,ABILITY_PROPERTY_FIRE​
```
It's recommended that these Apply and Remove mythic skills should essentially apply and remove an Aura from Mythic Mobs. As this allows you to configure onTick skills, onApply and onRemove even further.
`requires-target` has now uses the 'type' option. Where if requires-target was true then use the new skill type `TARGETED`, or else if false, use `ACTIVE`

## -- **Changes and Optimisations** --
  • - Mitigation can no longer be configured per class, simply due to exponential increase in calculations that was required to do this.
  • - The enchantment mitigation values in damages.yml are now ONLY considered
  • - Summoned mobs should now have improved AI behaviour
  • - Experience boosts are no longer applied for players which are 'opped'. This does mean that even if a player is opped AND has permission for experience boosts, then they will receive no personal exp boosts regardless.

### **Damage Handler Rewrite**
The damage handling of Heroes has been completely rewritten! This was a major issue with Heroes, since the previous DamageEvent listener had become a bundle of spaghetti code spanning 11 years of history. This was clearly causing MANY issues such as bugs and huge performance losses.
As such, the old code has been completely discarded, with new code and API written to handle the many complex facets of Heroes damage. For example now, certain checks such as let's say for custom mitigation, are now made at startup rather than every single time a damage event is called - since not all users use custom mitigation.
For reference; on 1.9.30, a profiler run over 15 minutes (with only 2 players mind you) saw a contribution of over 100ms of CPU time. A similar test on 1.10 saw that number drop to less than 5ms, in some cases the time taken was so small that it didn't even show up on the profiler. This is a massive improvement and a huge undertaking to comprehensively scan and understand the mess that was the old spaghetti code and make something new that is optimised and efficient.
Additionally, damage seems to be handled more consistently and accurate with this rewrite. But this is extremely comprehensive, please let us know if you encounter any bugs!

### **SkillConfigManager Rewrite**
The SkillConfigManager has been rewritten to now cache values read from a skill configuration. In addition to other rewrites mentioned in the API section of this update document, **you can now specify ANY increase-per-attribute or per-level for ANY numeric skill setting on ANY skill**. For example, you can specify `damage-per-dexterity` or `duration-increase-per-intellect` on any skill setting. For example let's take a look at Kick. Previously, you could only increase the damage per strength as shown;
```
Kick:
damage: 5
damage-increase-per-strength: 1
duration: 2500
```
But now you can configure something such as this, where you can use any attribute and even `per-level` to have skills dynamically scale with a Hero's attributes.
```
Kick:
damage: 5
damage-per-intellect: 0.5
duration: 2500
duration-increase-per-charisma: 500​
```
This change both allows for more customisation and also improves efficiency, reducing plugin latency.

With this change, you can now change the SkillSetting priority based on class and preference. In config.yml you can find this section.
```
classes:
# When getting the setting for a skill, here you can specify the priority type. The valid types are 'default', 'highest', or 'primary'
skill-setting-priority: HIGHEST
```
The available settings are;
**DEFAULT** -> Returns the first available skill setting in order of Primary, Secondary, Race, Global, Skills.yml. For example, if both a Hero's secondary class and race class have the skill setting for damage. Regardless of which is higher. The value from secondary will always be returned.

** HIGHEST** -> Returns the highest value for a skill setting based on each of a Hero's classes. For example if a Hero has the 'damage' setting equal to 8 for their primary, and 12 for their race. Then the 12 value is used. That 12 value is used even if a higher value of lets say 24 is specified in the skills.yml. In this mode only if neither the primary, secondary, race class, nor the global skill set have the skill setting specified is the skills.yml value used.

** PRIMARY** -> Only checks a player's Primary, Global and Skills.yml for a Skill Setting. Similar to default in that it will prefer primary over global. Where if neither primary and global has the setting set, then it will use the value from skills.yml.

### **Monster Handling Rewrite**
Monster objects are now initialised just as a monster spawns, rather than only as required. This reduces the required load on whatever execution is requesting a monster object, since they are almost always loaded anyway.
Removed outdated use of storing custom attributes in a monster's entity. This was contributing to significant server latency and served no real purpose anymore, hence it has been removed.

## -- **Bug Fixes** --
- Fixed major oversight regarding how armour and other mitigation is handled. Previously, the assumption was made that vanilla mitigation was not applied after all our handling; however I was wrong. What this meant is that when wearing armour, particularly with enchantments. The mitigation Heroes applied would be applied IN ADDITION to vanilla mitigation. This is why protection enchants were always so strong when using Heroes. Now, Heroes automatically adjusts for it's custom mitigation, ensuring that damage is dealt correctly.
- Side-effect of the above, is that custom enchant mitigation is now ONLY applied when custom mitigation is enabled! Additionally, the values read in damages.yml for protection is read as decimals, for example 0.04 will mean 4% per enchant level || if custom mitigation is disabled, then vanilla enchant mitigation values are applied.

  • - Fixed issue where skills would not heal in combat
  • - Effects which apply a 'no sprint debuff' now should work correctly. SlowEffect in particular and casting will now prevent a player from both sprinting and juping.
  • - Fixed issue with SkillBaseSphere which threw an exception.
  • - Fixed issue with SkillBaseMarkedTeleport which caused particles to not appear correctly
  • - Fixed bug where some skills would not broadcast their message and instead would spew a warning in console.
  • - Armour toughness is now considered correctly.
  • - Fixed bug where armour could be equipped under circumstances when it shouldn't.
  • - Removed old code that caused default health to be set incorrectly.
  • - Fixed a significant number of other miscellaneous bugs and issues

## -- **API Changes** --
- MythicMobs now have their own CharacterTemplate subclass called MythicMonster. This way, Heroes WILL NOT override a Mythic Mob's stats regardless of any configured values. Additionally, if a MythicMob is using a casting skill, a Hero's interrupt now actually applies to a MythicMob as well.
- SkillSetting is now an abstract class which stores static objects. A new interface `Setting<T>` now represents a SkillSetting that returns a specific variable of it's type parameter.
- All methods relating to `SkillConfigManager.getUseSetting()` have been deprecated, in favour of the method `SkillConfigManager.getCachedUseSetting()` which considers the type parameter of the SkillSetting
- A number of methods in CharacterDamageManager has been updated, removed or deprecated. If you wish to get the amount of damage a Hero will deal, it is recommended to use `getMeleeDamage(Hero, Material)` or `getProjectileDamage(Hero, ProjectileType)`. Keep in mind these values do not consider PvX multipliers, nor do they include bonus enchantment damage.
- HDamageListener is now completely deprecated and no longer used, instead the DamageHandler class is the main handler of damage.

The nexus repository has been updated. Please note that the repository URL has been updated, but as per usual, you can use the Heroes API with the following artifact;
```
<repository>
<id>heroes-repo</id>
<url>https://nexus.hc.to/content/repositories/pub_snapshots/</url>
</repository>

<dependency>
<groupId>com.herocraftonline.heroes</groupId>
<artifactId>Heroes</artifactId>
<version>1.10-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

```

## -- **Developer Notes** --
Due to many massive rewrites, if any custom skills are used, they **need** to be recompiled against `1.10-SNAPSHOT` otherwise they will not load. This is because we changed the SkillSetting enum class to an interface. This change was made for optimisations, cleaner code and the possibility to cache values.

There exists now a number of preset SkillSetting implementations such as SkillSettingInt, SkillSettingString, SkillSettingDouble and so on. You can even create your own SkillSetting which may read a configuration for example, and then return a custom object for your use in a skill.

SkillSettings such as `damage-increase-per-dexterity`, `duration-per-level` etc, are now deprecated. This is since SkillSettingInt and SkillSettingDouble automatically consider all attribute increases and per level increases on every skill setting as mentioned. Therefore these deprecated SkillSettings, will always return 0. Hence its no longer necessary to include them in code.

For example, it is no longer necessary to use code such as this;
```
double damage = SkillConfigManager.getUseSetting(hero, this, SkillSetting.DAMAGE, 50, false);
final double damageIncrease = SkillConfigManager.getUseSetting(hero, this, SkillSetting.DAMAGE_INCREASE_PER_STRENGTH, 1.0, false);
damage += damageIncrease * hero.getAttributeValue(AttributeType.STRENGTH);
```

Now, this is the only code necessary to achieve the same effect;
```
double damage = SkillConfigManager.getCachedUseSetting(hero, this, SkillSetting.DAMAGE, 50.0)
```

**Please do not hesitate to let us know if you have any issues with the new changes or require assistance with the API**
*This update has been tested extensively but due to the comprehensive rewrites it possible there may be some things that we missed.*

Thank you for supporting Heroes throughout all these years!
----------, Jul 4, 2023
Resource Information
Author:
----------
Total Downloads: 1,768
First Release: Jun 13, 2016
Last Update: Jan 9, 2025
Category: ---------------
All-Time Rating:
124 ratings
Find more info at discord.gg...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings