mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 11:58:06 +01:00
Add API to get default value of an Attribute
This commit is contained in:
parent
0fa1ad23ed
commit
521b64741e
@ -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 New Issue
Block a user