mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Expose attack cooldown methods for Player
This commit is contained in:
parent
228730983d
commit
0e656d111b
1 changed files with 15 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue