diff --git a/build.gradle.kts b/build.gradle.kts index 700001bf..81c6daca 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ @Suppress("PropertyName") -var VERSION = "3.6.1.3" +var VERSION = "3.6.1.4" plugins { // needed for the allprojects section to work id("java") diff --git a/spigot-jar/src/main/java/com/kamikazejam/kamicommon/gui/page/PagedKamiMenu.java b/spigot-jar/src/main/java/com/kamikazejam/kamicommon/gui/page/PagedKamiMenu.java index 8bff8898..b196bea3 100644 --- a/spigot-jar/src/main/java/com/kamikazejam/kamicommon/gui/page/PagedKamiMenu.java +++ b/spigot-jar/src/main/java/com/kamikazejam/kamicommon/gui/page/PagedKamiMenu.java @@ -223,6 +223,10 @@ public void openMenu(@NotNull Player player, int pageIndex) { */ @NotNull public KamiMenu applyToParent(int pageIndex) { + if (this.pageSlots.isEmpty()) { + throw new IllegalStateException("No page slots have been configured for a PagedKamiMenu, cannot open a page without slots!!!"); + } + // ***** WARNING ***** // All changes to KamiMenu are persisted between calls // It is imperative that data from previous calls is removed if necessary