#979: Add more translation keys

By: Miles Holder <mwholder2005@gmail.com>
This commit is contained in:
Bukkit/Spigot
2024-03-17 10:26:51 +11:00
parent 016f4cc0da
commit 6ba05011fa
6 changed files with 19 additions and 5 deletions

View File

@ -1,13 +1,15 @@
package org.bukkit.attribute;
import org.bukkit.Bukkit;
import org.bukkit.Keyed;
import org.bukkit.NamespacedKey;
import org.bukkit.Translatable;
import org.jetbrains.annotations.NotNull;
/**
* Types of attributes which may be present on an {@link Attributable}.
*/
public enum Attribute implements Keyed {
public enum Attribute implements Keyed, Translatable {
/**
* Maximum health of an Entity.
@ -77,4 +79,10 @@ public enum Attribute implements Keyed {
public NamespacedKey getKey() {
return key;
}
@NotNull
@Override
public String getTranslationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}
}