diff --git a/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java b/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java index 1ef349572..88221db4f 100644 --- a/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java +++ b/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java @@ -181,6 +181,10 @@ public class ComponentPresetManager { } allowedPresets.add(componentPreset); } + if (allowedPresets.isEmpty()) { + player.sendMessage(TranslatableCaption.of("preset.empty")); + return null; + } final int size = (int) Math.ceil((double) allowedPresets.size() / 9.0D); final PlotInventory plotInventory = new PlotInventory(this.inventoryUtil, player, size, TranslatableCaption.of("preset.title").getComponent(player)) { diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index ee3399e4c..96475e3e8 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -464,6 +464,7 @@ "preset.preset_lore_economy_disabled": "Cost: Economy is disabled", "preset.preset_lore_component": "Component: ", "preset.title": "Plot Components", + "preset.empty": "No plot component presets available.", "preset.economy_disabled": "The component preset '' has a price set but economy is disabled.", "generic.generic_other": "other", "generic.generic_merged": "merged",