Add FeatureFlag API

This commit is contained in:
Jake Potrebic
2023-03-09 11:24:43 -08:00
parent 3fc7f9269a
commit 0f47ed5252
14 changed files with 159 additions and 24 deletions
@@ -0,0 +1,27 @@
package org.bukkit;
import java.util.HashSet;
import java.util.Set;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@ApiStatus.Internal
@NullMarked
record FeatureFlagImpl(NamespacedKey key) implements FeatureFlag {
static final Set<FeatureFlag> ALL_FLAGS = new HashSet<>();
@Override
public NamespacedKey getKey() {
return this.key;
}
@ApiStatus.Internal
record Deprecated(NamespacedKey key) implements FeatureFlag {
@Override
public NamespacedKey getKey() {
return this.key;
}
}
}