diff --git a/src/main/java/me/unurled/sacredrealms/sr/SR.java b/src/main/java/me/unurled/sacredrealms/sr/SR.java index 79ec323..6959e34 100644 --- a/src/main/java/me/unurled/sacredrealms/sr/SR.java +++ b/src/main/java/me/unurled/sacredrealms/sr/SR.java @@ -43,6 +43,8 @@ public final class SR extends JavaPlugin { PacketEvents.getAPI().init(); + InvUI.getInstance().setPlugin(this); + SRCore.getInstance() .getManagers() .register( @@ -60,8 +62,6 @@ public final class SR extends JavaPlugin { TreasureManager.class, BackgroundManager.class, ResourcePackManager.class)); - - InvUI.getInstance().setPlugin(this); } @Override diff --git a/src/main/java/me/unurled/sacredrealms/sr/components/attributes/Attribute.java b/src/main/java/me/unurled/sacredrealms/sr/components/attributes/Attribute.java index 82f4c46..87cefae 100644 --- a/src/main/java/me/unurled/sacredrealms/sr/components/attributes/Attribute.java +++ b/src/main/java/me/unurled/sacredrealms/sr/components/attributes/Attribute.java @@ -4,58 +4,98 @@ import org.bukkit.NamespacedKey; import org.bukkit.persistence.PersistentDataType; public enum Attribute { - HEALTH("HEALTH", "Health", 100, 100000, 0, new NamespacedKey("sr", "health")), - STRENGTH("STRENGTH", "Strength", 10, 10000, 0, new NamespacedKey("sr", "strength")), - DEFENSE("DEFENSE", "Defense", 10, 10000, 0, new NamespacedKey("sr", "defense")), - AGILITY("AGILITY", "Agility", 100, 10000, 0, new NamespacedKey("sr", "agility")), - LUCK("LUCK", "Luck", 100, 99999, -99999, new NamespacedKey("sr", "luck")), - MANA("MANA", "Mana", 100, 10000, 0, new NamespacedKey("sr", "mana")), - CHARISMA("CHARISMA", "Charisma", 0, 10000, -10000, new NamespacedKey("sr", "charisma")), - ; + HEALTH( + "HEALTH", + "Health", + 100, + 100000, + 0, + new NamespacedKey("sr", "health") + ), + STRENGTH( + "STRENGTH", + "Strength", + 10, + 10000, + 0, + new NamespacedKey("sr", "strength") + ), + DEFENSE( + "DEFENSE", + "Defense", + 10, + 10000, + 0, + new NamespacedKey("sr", "defense") + ), + AGILITY( + "AGILITY", + "Agility", + 100, + 10000, + 0, + new NamespacedKey("sr", "agility") + ), + LUCK("LUCK", "Luck", 100, 99999, -99999, new NamespacedKey("sr", "luck")), + MANA("MANA", "Mana", 100, 10000, 0, new NamespacedKey("sr", "mana")), + CHARISMA( + "CHARISMA", + "Charisma", + 0, + 10000, + -10000, + new NamespacedKey("sr", "charisma") + ); - private final String name; - private final String id; - private final double defaultValue; - private final int maxValue; - private final int minValue; - private final NamespacedKey key; + private final String name; + private final String id; + private final double defaultValue; + private final int maxValue; + private final int minValue; + private final NamespacedKey key; - Attribute( - String id, String name, int defaultValue, int maxValue, int minValue, NamespacedKey key) { - this.id = id; - this.name = name; - this.defaultValue = defaultValue; - this.maxValue = maxValue; - this.minValue = minValue; - this.key = key; - } + Attribute( + String id, + String name, + int defaultValue, + int maxValue, + int minValue, + NamespacedKey key + ) { + this.id = id; + this.name = name; + this.defaultValue = defaultValue; + this.maxValue = maxValue; + this.minValue = minValue; + this.key = key; + } - public String getName() { - return name; - } + public String getName() { + return name; + } - public String getId() { - return id; - } + public String getId() { + return id; + } - public double getDefaultValue() { - return defaultValue; - } + public double getDefaultValue() { + return defaultValue; + } - public int getMaxValue() { - return maxValue; - } + public int getMaxValue() { + return maxValue; + } - public int getMinValue() { - return minValue; - } + public int getMinValue() { + return minValue; + } - @SuppressWarnings("SameReturnValue") - public PersistentDataType getType() { - return PersistentDataType.DOUBLE; - } + @SuppressWarnings("SameReturnValue") + public PersistentDataType getType() { + return PersistentDataType.DOUBLE; + } - public NamespacedKey getKey() { - return key; - } + public NamespacedKey getKey() { + return key; + } }