--== |
UPDATE 1.9.21 | ==-- Please let us know if you encounter any issues with this new update
--
Supported Minecraft Versions --
1.13.X, 1.14.X, 1.15.X, 1.16.X, 1.17.X, 1.18.X
--
IMPORTANT CHANGE REGARDING JAVA VERSION -- Previously Heroes was compiled using Java 11 meaning you had to run your server with Java 11 or higher. We have now moved to Java 17 as this is the latest LTS version of Java. We had to make this change as MythicLib/MythicMobs has substantially changed their API and we of course have updated ours, however since their plugins are compiled on Java 16, we had to update to.
TLDR - If you boot your server with this new version and Heroes DOESN'T load then you MAY need to "rebuild" the server.jar file using BuildTools with Java 17 as there's a chance it may have been compiled on an older version of Java. See the link below for how to use BuildTools if you're unfamiliar.
https://www.spigotmc.org/wiki/buildtools/
--
Changes and Bug Fixes --
- Transient permissions now are setup instantly rather than delayed, this may solve some exceptions being thrown under some cases
- Custom knockback calcs are performed as a monitor handler, meaning AFTER all other plugins have their say. This will prevent instances where a damage event may be cancelled but knockback is applied anyway, therefore causing the target to be 'pulled' towards the player
- Updated MythicMobs API, this version of Heroes will not work on older versions of MythicMobs/MythicLib
- Numerous improvements to consistency of saving with YML storage
- Races can now have base attributes which will ADD onto attributes specified by the primary class. Races can also have base HP, mana, stamina, shield and regenerations. When determining a player's base stats it will choose the higher of the stats between race and primary class.
- Debug log will now be limited to a size of 128 mb and 3 rotating logs.. This is due to an issue where the debug log would essentially eternally append to itself and grew to a very scary file size.
- Changed a lot of bad catching of exceptions.
- Updated SlowEffect to no longer set a player's hunger to low as this caused some inconsistencies. The goal of this was to prevent sprinting, however a slow potion effect pretty much does this. Additionally though it will give a corrupted jump boost effect which will prevent the player was jumping.
--
New API --
This update is quite important for any skill developers or people who program their own skills
Added a new interface called Listenable which is meant to be implemented by Skill subclasses.
Since many skill rely on internal SkillListeners to respond to events, I realised there was no way for this to be added ONLY if a player has the skill available to them. As such, every single skill that was loaded would ALWAYS have it's Listener registered regardless of if any player could actually use that skill or not. Some skills may not need to implement this interface such as one that restricts all players from doing something unless they have the skill. But for combat skills which may listen for a damage event, there is no reason for the listener to be registered unless a player has the skill.
In the past the listener was registered in the skill's constructor, using Bukkit.registerEvents() etc. I would recommend for Listeners that do not need to be registered unless the skill is being used to use the below structure. Everything else will be handled automagically by Heroes.
The reason this is an interface of course is to maintain backwards compat, so you don't HAVE to update your skills to this format, but it's recommended as it can increase performance.
Code (Text):
public class SkillExample extends ActiveSkill implements Listenable {
private final Listener listener;
public SkillExample() {
listener = new SkillListener();
}
@Override
public Listener getListener() {
return listener;
}
}