Add 1.9+ PvP 'Cooldown' (#768)

* Add 1.9+ PvP 'Cooldown'

This commit adds a subtitle that acts as the Java cooldown. This is an optional feature disabled in the config with `show-cooldown`. This does not appear on plugins that use OldCombatMechanics.

* No need to bump up the config version; I was just tested with OldCombatMechanics

* Use simpler casting

* Use session variable of lastHitTime for theoretically better performance

* Reuse attribute value calculation from AttributeUtils

* Remove unused imports

* Revert config version update in config.yml
This commit is contained in:
Camotoy 2020-06-16 20:03:28 -04:00 committed by GitHub
parent 256c62ce88
commit 9369b20209
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 176 additions and 4 deletions

View file

@ -129,6 +129,11 @@ public class GeyserSpongeConfiguration implements GeyserConfiguration {
return node.getNode("allow-third-party-ears").getBoolean(false);
}
@Override
public boolean isShowCooldown() {
return node.getNode("show-cooldown").getBoolean(true);
}
@Override
public String getDefaultLocale() {
return node.getNode("default-locale").getString("en_us");