mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
Bump Configurate
This commit is contained in:
1 parent
4a36172cdb
commit
96385ae889
8 files changed
+34
-35
No files matched your search
+4
-4
@@ -7,8 +7,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.spongepowered.configurate.CommentedConfigurationNode;
|
||||
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMapper;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMappingException;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Setting;
|
||||
import org.spongepowered.configurate.serialize.SerializationException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
@@ -26,16 +26,16 @@ public class CommandSettingsRegistry implements Registry<String, CommandSettings
|
||||
static {
|
||||
try {
|
||||
MAPPER = ObjectMapper.factory().get(CommandSettingsRegistry.class);
|
||||
} catch (final ObjectMappingException e) {
|
||||
} catch (final SerializationException e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static CommandSettingsRegistry loadFrom(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public static CommandSettingsRegistry loadFrom(final CommentedConfigurationNode node) throws SerializationException {
|
||||
return MAPPER.load(node);
|
||||
}
|
||||
|
||||
public void saveTo(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public void saveTo(final CommentedConfigurationNode node) throws SerializationException {
|
||||
MAPPER.save(this, node);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.spongepowered.configurate.CommentedConfigurationNode;
|
||||
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMapper;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMappingException;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Comment;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Setting;
|
||||
import org.spongepowered.configurate.serialize.SerializationException;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
@@ -24,16 +24,16 @@ public final class CarbonSettings {
|
||||
static {
|
||||
try {
|
||||
MAPPER = ObjectMapper.factory().get(CarbonSettings.class);
|
||||
} catch (final ObjectMappingException e) {
|
||||
} catch (final SerializationException e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static CarbonSettings loadFrom(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public static CarbonSettings loadFrom(final CommentedConfigurationNode node) throws SerializationException {
|
||||
return MAPPER.load(node);
|
||||
}
|
||||
|
||||
public void saveTo(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public void saveTo(final CommentedConfigurationNode node) throws SerializationException {
|
||||
MAPPER.save(this, node);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ package net.draycia.carbon.api.config;
|
||||
import org.spongepowered.configurate.CommentedConfigurationNode;
|
||||
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMapper;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMappingException;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Setting;
|
||||
import org.spongepowered.configurate.serialize.SerializationException;
|
||||
|
||||
@ConfigSerializable
|
||||
public final class CarbonTranslations {
|
||||
@@ -14,16 +14,16 @@ public final class CarbonTranslations {
|
||||
static {
|
||||
try {
|
||||
MAPPER = ObjectMapper.factory().get(CarbonTranslations.class);
|
||||
} catch (final ObjectMappingException e) {
|
||||
} catch (final SerializationException e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static CarbonTranslations loadFrom(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public static CarbonTranslations loadFrom(final CommentedConfigurationNode node) throws SerializationException {
|
||||
return MAPPER.load(node);
|
||||
}
|
||||
|
||||
public void saveTo(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public void saveTo(final CommentedConfigurationNode node) throws SerializationException {
|
||||
MAPPER.save(this, node);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ package net.draycia.carbon.api.config;
|
||||
import org.spongepowered.configurate.CommentedConfigurationNode;
|
||||
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMapper;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMappingException;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Comment;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Setting;
|
||||
import org.spongepowered.configurate.serialize.SerializationException;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
@@ -18,16 +18,16 @@ public final class ChannelSettings {
|
||||
static {
|
||||
try {
|
||||
MAPPER = ObjectMapper.factory().get(ChannelSettings.class);
|
||||
} catch (final ObjectMappingException e) {
|
||||
} catch (final SerializationException e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static ChannelSettings loadFrom(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public static ChannelSettings loadFrom(final CommentedConfigurationNode node) throws SerializationException {
|
||||
return MAPPER.load(node);
|
||||
}
|
||||
|
||||
public void saveTo(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public void saveTo(final CommentedConfigurationNode node) throws SerializationException {
|
||||
MAPPER.save(this, node);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ package net.draycia.carbon.api.config;
|
||||
import org.spongepowered.configurate.CommentedConfigurationNode;
|
||||
import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMapper;
|
||||
import org.spongepowered.configurate.objectmapping.ObjectMappingException;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Comment;
|
||||
import org.spongepowered.configurate.objectmapping.meta.Setting;
|
||||
import org.spongepowered.configurate.serialize.SerializationException;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
@@ -21,16 +21,16 @@ public final class ModerationSettings {
|
||||
static {
|
||||
try {
|
||||
MAPPER = ObjectMapper.factory().get(ModerationSettings.class);
|
||||
} catch (final ObjectMappingException e) {
|
||||
} catch (final SerializationException e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static ModerationSettings loadFrom(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public static ModerationSettings loadFrom(final CommentedConfigurationNode node) throws SerializationException {
|
||||
return MAPPER.load(node);
|
||||
}
|
||||
|
||||
public void saveTo(final CommentedConfigurationNode node) throws ObjectMappingException {
|
||||
public void saveTo(final CommentedConfigurationNode node) throws SerializationException {
|
||||
MAPPER.save(this, node);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user