Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Create attributes.md #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions feature/attributes.md
Original file line number Diff line number Diff line change
@@ -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).