Address comments

This commit is contained in:
NotMyFault 2022-02-09 13:55:57 +01:00
parent 400f856c9a
commit 4b96a649f7
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C

View File

@ -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