mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Simplify Tag#defaultValue
This commit is contained in:
parent
60c1b2c4e9
commit
9a1062b028
@ -54,7 +54,7 @@ public class Tag<T> {
|
||||
|
||||
@Contract(value = "_ -> new", pure = true)
|
||||
public Tag<T> defaultValue(@NotNull T defaultValue) {
|
||||
return new Tag<>(key, readFunction, writeConsumer, () -> defaultValue);
|
||||
return defaultValue(() -> defaultValue);
|
||||
}
|
||||
|
||||
@Contract(value = "_, _ -> new", pure = true)
|
||||
|
Loading…
Reference in New Issue
Block a user