mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +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