did requested changes

This commit is contained in:
Skyslycer
2021-08-16 19:11:34 +02:00
parent e4681af822
commit a204867ff0
3 changed files with 18 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ class GUIData<T : ForInventory>(
val transitionTo: InventoryChangeEffect?,
val transitionFrom: InventoryChangeEffect?,
internal val generalOnClick: ((GUIClickEvent<T>) -> Unit)?,
internal val onClose: ((InventoryCloseEvent) -> Unit)?
internal val onClose: ((GUICloseEvent<T>) -> Unit)?
)
abstract class GUI<T : ForInventory>(
@@ -99,7 +99,7 @@ class GUIIndividual<T : ForInventory>(
if (resetOnClose || data.onClose != null) {
listen<InventoryCloseEvent> {
if (data.onClose != null && playerInstances[it.player]?.bukkitInventory == it.inventory) {
data.onClose.invoke(it)
data.onClose.invoke(GUICloseEvent(it, playerInstances[it.player]!!, it.player as Player))
}
if (resetOnClose) {