diff options
author | md_5 <git@md-5.net> | 2016-12-09 12:31:08 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-12-09 12:31:25 +1100 |
commit | 521b64741e4ba929fbf8bc9f4da4caa2f0e3d9e1 (patch) | |
tree | b304ea3c0598390d66170634e9895e72dbf7eb5a /src | |
parent | 0fa1ad23ed52d1d5b8bcc8ca73783d11a56b93cb (diff) | |
download | craftbukkit-521b64741e4ba929fbf8bc9f4da4caa2f0e3d9e1.tar craftbukkit-521b64741e4ba929fbf8bc9f4da4caa2f0e3d9e1.tar.gz craftbukkit-521b64741e4ba929fbf8bc9f4da4caa2f0e3d9e1.tar.lz craftbukkit-521b64741e4ba929fbf8bc9f4da4caa2f0e3d9e1.tar.xz craftbukkit-521b64741e4ba929fbf8bc9f4da4caa2f0e3d9e1.zip |
Add API to get default value of an Attribute
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java index 1ed4aa94..31e608a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java +++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java @@ -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()); } |