Auto-registered PersistentDataKeys
This commit is contained in:
@@ -42,18 +42,9 @@ public class PersistentDataKey<T> {
|
||||
this.key = key;
|
||||
this.defaultValue = defaultValue;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the key with the server.
|
||||
*
|
||||
* @return The key, registered.
|
||||
*/
|
||||
public PersistentDataKey<T> register() {
|
||||
Eco.getHandler().getKeyRegistry().registerKey(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PersistentDataKey{"
|
||||
|
||||
@@ -25,7 +25,7 @@ public class PlayerUtils {
|
||||
NamespacedKeyUtils.createEcoKey("player_name"),
|
||||
PersistentDataKeyType.STRING,
|
||||
"Unknown Player"
|
||||
).register();
|
||||
);
|
||||
|
||||
/**
|
||||
* Get the audience from a player.
|
||||
|
||||
Reference in New Issue
Block a user