From 4b96a649f79f4cc74c2d60f7d723af2dfe08a59d Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Wed, 9 Feb 2022 13:55:57 +0100 Subject: [PATCH] Address comments --- .../plotsquared/core/components/ComponentPresetManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 7ac0db4b8..c80f04a78 100644 --- a/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java +++ b/Core/src/main/java/com/plotsquared/core/components/ComponentPresetManager.java @@ -181,13 +181,11 @@ public class ComponentPresetManager { } allowedPresets.add(componentPreset); } - final int size; if (allowedPresets.isEmpty()) { player.sendMessage(TranslatableCaption.of("preset.empty")); return null; - } else { - size = (int) Math.ceil((double) allowedPresets.size() / 9.0D); } + 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)) { @Override