diff --git a/src/main/java/xyz/nucleoid/plasmid/game/stats/StatisticKey.java b/src/main/java/xyz/nucleoid/plasmid/game/stats/StatisticKey.java index 2be9ef15..8c87f8b2 100644 --- a/src/main/java/xyz/nucleoid/plasmid/game/stats/StatisticKey.java +++ b/src/main/java/xyz/nucleoid/plasmid/game/stats/StatisticKey.java @@ -46,26 +46,66 @@ public String getTranslationKey() { return Util.createTranslationKey("statistic", this.id); } + public static StatisticKey intKey(Identifier id) { + return new StatisticKey<>(id, ValueType.INT, StorageType.TOTAL, false); + } + + public static StatisticKey floatKey(Identifier id) { + return new StatisticKey<>(id, ValueType.FLOAT, StorageType.TOTAL, false); + } + + public static StatisticKey doubleKey(Identifier id) { + return new StatisticKey<>(id, ValueType.FLOAT, StorageType.TOTAL, false); + } + + public StatisticKey hidden(boolean hidden) { + return new StatisticKey<>(this.id, this.valueType, this.storageType, hidden); + } + + /** + * @deprecated {@link StorageType} is not used, instead use {@link StatisticKey#intKey(Identifier)} + */ + @Deprecated public static StatisticKey intKey(Identifier id, StorageType storageType) { return new StatisticKey<>(id, ValueType.INT, storageType, false); } + /** + * @deprecated {@link StorageType} is not used, instead use {@link StatisticKey#floatKey(Identifier)} + */ + @Deprecated public static StatisticKey floatKey(Identifier id, StorageType storageType) { return new StatisticKey<>(id, ValueType.FLOAT, storageType, false); } + /** + * @deprecated {@link StorageType} is not used, instead use {@link StatisticKey#doubleKey(Identifier)} + */ + @Deprecated public static StatisticKey doubleKey(Identifier id, StorageType storageType) { return new StatisticKey<>(id, ValueType.FLOAT, storageType, false); } + /** + * @deprecated {@link StorageType} is not used, instead use {@link StatisticKey#intKey(Identifier)} + */ + @Deprecated public static StatisticKey hiddenIntKey(Identifier id, StorageType storageType) { return new StatisticKey<>(id, ValueType.INT, storageType, true); } + /** + * @deprecated {@link StorageType} is not used, instead use {@link StatisticKey#floatKey(Identifier)} + */ + @Deprecated public static StatisticKey hiddenFloatKey(Identifier id, StorageType storageType) { return new StatisticKey<>(id, ValueType.FLOAT, storageType, true); } + /** + * @deprecated {@link StorageType} is not used, instead use {@link StatisticKey#doubleKey(Identifier)} + */ + @Deprecated public static StatisticKey hiddenDoubleKey(Identifier id, StorageType storageType) { return new StatisticKey<>(id, ValueType.FLOAT, storageType, true); }