mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
Add API to get default value of an Attribute
By: md_5 <git@md-5.net>
This commit is contained in:
parent
597dc19283
commit
cd5305a554
1 changed files with 5 additions and 0 deletions
|
@ -60,6 +60,11 @@ public class CraftAttributeInstance implements AttributeInstance {
|
|||
return handle.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDefaultValue() {
|
||||
return handle.getAttribute().getDefault();
|
||||
}
|
||||
|
||||
private static net.minecraft.server.AttributeModifier convert(AttributeModifier bukkit) {
|
||||
return new net.minecraft.server.AttributeModifier(bukkit.getUniqueId(), bukkit.getName(), bukkit.getAmount(), bukkit.getOperation().ordinal());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue