mirror of
https://github.com/darksaid98/nightcore-spigot.git
synced 2026-12-04 14:38:46 +00:00
v2.7.2
This commit is contained in:
1 parent
5a13e98744
commit
af553c6f63
2 files changed
+8
No files matched your search
@@ -5,6 +5,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import su.nightexpress.nightcore.util.StringUtil;
|
import su.nightexpress.nightcore.util.StringUtil;
|
||||||
import su.nightexpress.nightcore.util.TriFunction;
|
import su.nightexpress.nightcore.util.TriFunction;
|
||||||
|
import su.nightexpress.nightcore.util.bukkit.NightItem;
|
||||||
import su.nightexpress.nightcore.util.bukkit.NightSound;
|
import su.nightexpress.nightcore.util.bukkit.NightSound;
|
||||||
import su.nightexpress.nightcore.util.wrapper.UniFormatter;
|
import su.nightexpress.nightcore.util.wrapper.UniFormatter;
|
||||||
import su.nightexpress.nightcore.util.wrapper.UniParticle;
|
import su.nightexpress.nightcore.util.wrapper.UniParticle;
|
||||||
@@ -116,6 +117,11 @@ public class ConfigValue<T> {
|
|||||||
return create(path, FileConfig::getItem, FileConfig::setItem, defaultValue, description);
|
return create(path, FileConfig::getItem, FileConfig::setItem, defaultValue, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
public static ConfigValue<NightItem> create(@NotNull String path, @NotNull NightItem defaultValue, @Nullable String... description) {
|
||||||
|
return create(path, FileConfig::getCosmeticItem, FileConfig::set, defaultValue, description);
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static ConfigValue<UniSound> create(@NotNull String path, @NotNull UniSound defaultValue, @Nullable String... description) {
|
public static ConfigValue<UniSound> create(@NotNull String path, @NotNull UniSound defaultValue, @Nullable String... description) {
|
||||||
|
|||||||
@@ -153,6 +153,8 @@ public class FileConfig extends YamlConfiguration {
|
|||||||
public void set(@NotNull String path, @Nullable Object value) {
|
public void set(@NotNull String path, @Nullable Object value) {
|
||||||
if (value instanceof Writeable writeable) {
|
if (value instanceof Writeable writeable) {
|
||||||
writeable.write(this, path);
|
writeable.write(this, path);
|
||||||
|
this.changed = true;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (value instanceof String str) {
|
else if (value instanceof String str) {
|
||||||
value = Colorizer.plain(str);
|
value = Colorizer.plain(str);
|
||||||
|
|||||||
Reference in new issue
Block a user