mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Provide full verbosity for invalid components
This commit is contained in:
		@@ -62,7 +62,7 @@ public class ComponentPreset implements ConfigurationSerializable {
 | 
				
			|||||||
    public static ComponentPreset deserialize(final @NonNull Map<String, Object> map) {
 | 
					    public static ComponentPreset deserialize(final @NonNull Map<String, Object> map) {
 | 
				
			||||||
        final ClassicPlotManagerComponent classicPlotManagerComponent = ClassicPlotManagerComponent
 | 
					        final ClassicPlotManagerComponent classicPlotManagerComponent = ClassicPlotManagerComponent
 | 
				
			||||||
                .fromString(map.getOrDefault("component", "").toString()).orElseThrow(() ->
 | 
					                .fromString(map.getOrDefault("component", "").toString()).orElseThrow(() ->
 | 
				
			||||||
                        new IllegalArgumentException("The preset needs a valid target component"));
 | 
					                        new IllegalArgumentException("The preset in components.yml needs a valid target component, got: " + map.get("component")));
 | 
				
			||||||
        final String pattern = map.getOrDefault("pattern", "").toString();
 | 
					        final String pattern = map.getOrDefault("pattern", "").toString();
 | 
				
			||||||
        final double cost = Double.parseDouble(map.getOrDefault("cost", "0.0").toString());
 | 
					        final double cost = Double.parseDouble(map.getOrDefault("cost", "0.0").toString());
 | 
				
			||||||
        final String permission = map.getOrDefault("permission", "").toString();
 | 
					        final String permission = map.getOrDefault("permission", "").toString();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user