Expose attack cooldown methods for Player

This commit is contained in:
BillyGalbreath 2018-09-04 15:02:00 -05:00
parent 228730983d
commit 0e656d111b

View file

@ -2980,6 +2980,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers;
}
@Override
public float getCooldownPeriod() {
return getHandle().getCurrentItemAttackStrengthDelay();
}
@Override
public float getCooledAttackStrength(float adjustTicks) {
return getHandle().getAttackStrengthScale(adjustTicks);
}
@Override
public void resetCooldown() {
getHandle().resetAttackStrengthTicker();
}
// Paper end
// Spigot start
private final Player.Spigot spigot = new Player.Spigot()