From 0e439db7b33edceaaf97b280b2c4ba3de2e4fc07 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Mon, 1 Nov 2021 21:01:57 +0000 Subject: [PATCH] Auto-registered PersistentDataKeys --- .../com/willfp/eco/core/data/keys/PersistentDataKey.java | 9 --------- .../src/main/java/com/willfp/eco/util/PlayerUtils.java | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java b/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java index 1ab719b2..cd7ad99a 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java +++ b/eco-api/src/main/java/com/willfp/eco/core/data/keys/PersistentDataKey.java @@ -42,18 +42,9 @@ public class PersistentDataKey { this.key = key; this.defaultValue = defaultValue; this.type = type; - } - /** - * Register the key with the server. - * - * @return The key, registered. - */ - public PersistentDataKey register() { Eco.getHandler().getKeyRegistry().registerKey(this); - return this; } - @Override public String toString() { return "PersistentDataKey{" diff --git a/eco-api/src/main/java/com/willfp/eco/util/PlayerUtils.java b/eco-api/src/main/java/com/willfp/eco/util/PlayerUtils.java index d7698966..96fa847e 100644 --- a/eco-api/src/main/java/com/willfp/eco/util/PlayerUtils.java +++ b/eco-api/src/main/java/com/willfp/eco/util/PlayerUtils.java @@ -25,7 +25,7 @@ public class PlayerUtils { NamespacedKeyUtils.createEcoKey("player_name"), PersistentDataKeyType.STRING, "Unknown Player" - ).register(); + ); /** * Get the audience from a player.