From 2d090153a610a81daac0f84dfbcce5e3f95183f5 Mon Sep 17 00:00:00 2001 From: bluefireoly Date: Fri, 2 Oct 2020 21:59:04 +0200 Subject: [PATCH] StackOverflowError fix and R7 --- build.gradle.kts | 2 +- .../kotlin/net/axay/kspigot/inventory/InventoryGUI.kt | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f1980f56..271c999e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,7 +17,7 @@ val GITHUB_URL = "https://github.com/bluefireoly/KSpigot" */ group = "net.axay" -version = "1.16.3_R6" +version = "1.16.3_R7" description = "A Kotlin API for the Minecraft Server Software \"Spigot\"." diff --git a/src/main/kotlin/net/axay/kspigot/inventory/InventoryGUI.kt b/src/main/kotlin/net/axay/kspigot/inventory/InventoryGUI.kt index d29d3909..a6b968a6 100644 --- a/src/main/kotlin/net/axay/kspigot/inventory/InventoryGUI.kt +++ b/src/main/kotlin/net/axay/kspigot/inventory/InventoryGUI.kt @@ -107,11 +107,9 @@ class InventoryGUIShared( inventoryGUIData: InventoryGUIData ) : InventoryGUI(inventoryGUIData) { - override val bukkitInventory by lazy { - val inv = data.inventoryType.createBukkitInv(null, data.title) - loadPage(DEFAULT_PAGE) - return@lazy inv - } + override val bukkitInventory = data.inventoryType.createBukkitInv(null, data.title) + + init { loadPage(DEFAULT_PAGE) } override fun isThisInv(inventory: Inventory) = inventory == bukkitInventory