diff --git a/src/main/kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt b/src/main/kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt index b3fdddc7..41394652 100644 --- a/src/main/kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt +++ b/src/main/kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt @@ -61,7 +61,7 @@ abstract class AbstractGUISpaceCompound internal constructo private fun recalculateCurrentContent() { if (scrollProgress > content.size) - throw IllegalStateException("The scrollProgress is greater than the content size.") + scrollProgress = content.size // avoid IndexOutOfBoundsException var sliceUntil = internalSlots.size + scrollProgress if (sliceUntil > content.lastIndex)