mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-19 05:31:32 +01:00
Add API to get / set base arrow damage
By: md_5 <git@md-5.net>
This commit is contained in:
parent
70789fee2e
commit
1f95e4ef1c
1 changed files with 11 additions and 0 deletions
|
@ -26,6 +26,17 @@ public class CraftArrow extends AbstractProjectile implements Arrow {
|
||||||
return getHandle().knockbackStrength;
|
return getHandle().knockbackStrength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getDamage() {
|
||||||
|
return getHandle().getDamage();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDamage(double damage) {
|
||||||
|
Preconditions.checkArgument(damage >= 0, "Damage must be positive");
|
||||||
|
getHandle().setDamage(damage);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isCritical() {
|
public boolean isCritical() {
|
||||||
return getHandle().isCritical();
|
return getHandle().isCritical();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue