fixed shrinking border warning

This commit is contained in:
2025-04-09 23:05:46 +02:00
parent 34df173940
commit 9544c953a2
3 changed files with 5 additions and 3 deletions

View File

@ -82,6 +82,8 @@ public abstract class IntegerSetting extends Setting<Integer> {
this.state = container.has(this.getNamespacedKey())
? Integer.valueOf(Objects.requireNonNull(container.get(this.getNamespacedKey(), PersistentDataType.STRING)))
: this.defaultValue();
if(!this.options.contains(this.state)) this.state = this.defaultValue();
}
@Override

View File

@ -17,7 +17,7 @@ import org.bukkit.persistence.PersistentDataContainer;
import java.util.List;
public abstract class Setting<TDataType> {
TDataType state;
protected TDataType state;
private final Settings.Key key;
public Setting(Settings.Key key) {