mirror of
https://github.com/YouHaveTrouble/QuickerStacker.git
synced 2026-05-11 21:56:55 +00:00
config maybe
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
package me.youhavetrouble.quickerstacker.config;
|
||||||
|
|
||||||
|
import com.hypixel.hytale.codec.Codec;
|
||||||
|
import com.hypixel.hytale.codec.KeyedCodec;
|
||||||
|
import com.hypixel.hytale.codec.builder.BuilderCodec;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public class QuickerStackerConfig {
|
||||||
|
|
||||||
|
private String[] quickStackContainers;
|
||||||
|
private Set<String> quickStackContainerSet;
|
||||||
|
|
||||||
|
public static final BuilderCodec<QuickerStackerConfig> CODEC = BuilderCodec.builder(QuickerStackerConfig.class, QuickerStackerConfig::new)
|
||||||
|
.append(new KeyedCodec<>("quickStackContainers", Codec.STRING_ARRAY),
|
||||||
|
(config, value) -> {
|
||||||
|
config.quickStackContainers = value;
|
||||||
|
config.quickStackContainerSet = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(config.quickStackContainers)));
|
||||||
|
},
|
||||||
|
(config) -> config.quickStackContainers).add()
|
||||||
|
.build();
|
||||||
|
|
||||||
|
public QuickerStackerConfig() {}
|
||||||
|
|
||||||
|
public Set<String> getQuickStackContainers() {
|
||||||
|
return quickStackContainerSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user