mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-01 16:19:53 +01:00
fixing some serializer errors
This commit is contained in:
parent
5fc416a457
commit
9d9b5464c3
@ -311,7 +311,7 @@ public final class ConfigManager {
|
|||||||
DEFAULT_SERIALIZERS.registerType(TypeToken.of(Pattern.class), new PatternSerializer());
|
DEFAULT_SERIALIZERS.registerType(TypeToken.of(Pattern.class), new PatternSerializer());
|
||||||
*/
|
*/
|
||||||
|
|
||||||
customSerializers = TypeSerializers.newCollection();
|
customSerializers = TypeSerializers.getDefaultSerializers().newChild();
|
||||||
|
|
||||||
mcMMO.p.getLogger().info("Registering custom type serializers for Configurate...");
|
mcMMO.p.getLogger().info("Registering custom type serializers for Configurate...");
|
||||||
customSerializers.registerType(new TypeToken<Material>() {}, new CustomEnumValueSerializer());
|
customSerializers.registerType(new TypeToken<Material>() {}, new CustomEnumValueSerializer());
|
||||||
|
@ -56,7 +56,7 @@ public class SalvageableSerializer implements TypeSerializer<Salvageable> {
|
|||||||
public void serialize(TypeToken<?> type, Salvageable obj, ConfigurationNode value) {
|
public void serialize(TypeToken<?> type, Salvageable obj, ConfigurationNode value) {
|
||||||
|
|
||||||
value.getNode(ITEM_NODE_NAME).setValue(obj.getItemMaterial().getKey().toString());
|
value.getNode(ITEM_NODE_NAME).setValue(obj.getItemMaterial().getKey().toString());
|
||||||
value.getNode(ITEM_RETURNED_BY_SALVAGE).setValue(obj.getSalvagedItemMaterial());
|
value.getNode(ITEM_RETURNED_BY_SALVAGE).setValue(obj.getSalvagedItemMaterial().getKey().toString());
|
||||||
value.getNode(MAXIMUM_QUANTITY_RETURNED).setValue(obj.getMaximumQuantity());
|
value.getNode(MAXIMUM_QUANTITY_RETURNED).setValue(obj.getMaximumQuantity());
|
||||||
value.getNode(OVERRIDE_LEVEL_REQUIREMENT).setValue(obj.getMinimumLevel());
|
value.getNode(OVERRIDE_LEVEL_REQUIREMENT).setValue(obj.getMinimumLevel());
|
||||||
}
|
}
|
||||||
|
@ -13,14 +13,14 @@ public class ConfigAcrobatics {
|
|||||||
"\nSettings related to preventing abuse of this skill can be found in the anti_exploit config file.")
|
"\nSettings related to preventing abuse of this skill can be found in the anti_exploit config file.")
|
||||||
private ConfigRoll roll = new ConfigRoll();
|
private ConfigRoll roll = new ConfigRoll();
|
||||||
|
|
||||||
public ConfigRoll getRoll() {
|
|
||||||
return roll;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Setting(value = "Dodge", comment = "Settings related to the Dodge Sub-Skill." +
|
@Setting(value = "Dodge", comment = "Settings related to the Dodge Sub-Skill." +
|
||||||
"\nSettings related to preventing abuse of this skill can be found in the anti_exploit config file.")
|
"\nSettings related to preventing abuse of this skill can be found in the anti_exploit config file.")
|
||||||
private ConfigDodge dodge = new ConfigDodge();
|
private ConfigDodge dodge = new ConfigDodge();
|
||||||
|
|
||||||
|
public ConfigRoll getRoll() {
|
||||||
|
return roll;
|
||||||
|
}
|
||||||
|
|
||||||
public ConfigDodge getDodge() {
|
public ConfigDodge getDodge() {
|
||||||
return dodge;
|
return dodge;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package com.gmail.nossr50.config.hocon.skills.salvage.general;
|
package com.gmail.nossr50.config.hocon.skills.salvage.general;
|
||||||
|
|
||||||
import ninja.leaping.configurate.objectmapping.Setting;
|
import ninja.leaping.configurate.objectmapping.Setting;
|
||||||
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
|
||||||
|
@ConfigSerializable
|
||||||
public class ConfigSalvageGeneral {
|
public class ConfigSalvageGeneral {
|
||||||
|
|
||||||
public static final boolean ANVIL_USE_SOUNDS_DEFAULT = true;
|
public static final boolean ANVIL_USE_SOUNDS_DEFAULT = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user