mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 09:13:43 +01:00 
			
		
		
		
	fixing some serializer errors
This commit is contained in:
		| @@ -311,7 +311,7 @@ public final class ConfigManager { | ||||
|             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..."); | ||||
|         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) { | ||||
|  | ||||
|         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(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.") | ||||
|     private ConfigRoll roll = new ConfigRoll(); | ||||
|  | ||||
|     public ConfigRoll getRoll() { | ||||
|         return roll; | ||||
|     } | ||||
|  | ||||
|     @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.") | ||||
|     private ConfigDodge dodge = new ConfigDodge(); | ||||
|  | ||||
|     public ConfigRoll getRoll() { | ||||
|         return roll; | ||||
|     } | ||||
|  | ||||
|     public ConfigDodge getDodge() { | ||||
|         return dodge; | ||||
|     } | ||||
|   | ||||
| @@ -1,8 +1,10 @@ | ||||
| package com.gmail.nossr50.config.hocon.skills.salvage.general; | ||||
|  | ||||
| import ninja.leaping.configurate.objectmapping.Setting; | ||||
| import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; | ||||
| import org.bukkit.Material; | ||||
|  | ||||
| @ConfigSerializable | ||||
| public class ConfigSalvageGeneral { | ||||
|  | ||||
|     public static final boolean ANVIL_USE_SOUNDS_DEFAULT = true; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 nossr50
					nossr50