From b7802fcb7c93805889563cf5c73f5e058ec92a7a Mon Sep 17 00:00:00 2001 From: MrGeoTech <73970344+MrGeoTech@users.noreply.github.com> Date: Wed, 15 Mar 2023 09:29:54 -0500 Subject: [PATCH] Create attributes.md Many people seem to not realize this is a thing or, like me, forget it is there. Adding a wiki page for it will help ease confusion. --- feature/attributes.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 feature/attributes.md diff --git a/feature/attributes.md b/feature/attributes.md new file mode 100644 index 0000000..b88d7be --- /dev/null +++ b/feature/attributes.md @@ -0,0 +1,17 @@ +# Attributes + +Attributes are one of the easiest ways to change certain aspects about a player. This api allows for simple and traceable player attribute modification. + +Go [here](https://javadoc.minestom.net/net/minestom/server/attribute/Attribute.html) to see all the possible attributes. + +## Attribute Instances + +All attributes have a corresponging attribute instance. To get the attribute instance, do as follows: + +```java +LivingEntity#getAttribute(Attribute) +``` + +Once you have an attribute instance, you can modify the value and base value of the attribute along with adding modifiers. It is recommended that you use modifiers as they can be identified and easily removed later. + +> For more information, check out the [javadocs](https://javadoc.minestom.net/net/minestom/server/attribute/package-summary.html).