Skip to content

Commit

Permalink
3.6.1.4
Browse files Browse the repository at this point in the history
- Dedicated error when paged menus are trying to open but have no page slots. Previously this caused an integer overflow number of empty pages.

Took 4 minutes
  • Loading branch information
Jake-Moore committed Nov 13, 2024
1 parent 4ccef54 commit e0a70a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0a70a3

Please sign in to comment.