mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 12:46:46 +01:00
Provide full verbosity for invalid components
This commit is contained in:
parent
c45bbe3ec5
commit
0558fcf5d5
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user