mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32: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;
|
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
|
// Paper end
|
||||||
// Spigot start
|
// Spigot start
|
||||||
private final Player.Spigot spigot = new Player.Spigot()
|
private final Player.Spigot spigot = new Player.Spigot()
|
||||||
|
|
Loading…
Reference in a new issue