-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewire menu close handling; update to J21; fixes #2
- Loading branch information
Showing
15 changed files
with
78 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 1 addition & 8 deletions
9
interfaces/src/main/kotlin/com/noxcrew/interfaces/interfaces/ChestInterface.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 2 additions & 14 deletions
16
interfaces/src/main/kotlin/com/noxcrew/interfaces/interfaces/Interface.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
interfaces/src/main/kotlin/com/noxcrew/interfaces/interfaces/InterfaceProperties.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.noxcrew.interfaces.interfaces | ||
|
||
import com.noxcrew.interfaces.click.ClickHandler | ||
import com.noxcrew.interfaces.pane.Pane | ||
import com.noxcrew.interfaces.transform.AppliedTransform | ||
import org.bukkit.event.inventory.InventoryCloseEvent | ||
import org.bukkit.inventory.ItemStack | ||
|
||
/** Stores all shared properties of an interface. */ | ||
public data class InterfaceProperties<P : Pane>( | ||
/** All close handlers on this interface mapped by closing reason. */ | ||
public val closeHandlers: Map<InventoryCloseEvent.Reason, CloseHandler> = emptyMap(), | ||
/** All transforms that make up this interface. */ | ||
public val transforms: Collection<AppliedTransform<P>> = emptySet(), | ||
/** A collection of click handlers that will be run before each click without blocking. */ | ||
public val clickPreprocessors: Collection<ClickHandler> = emptySet(), | ||
/** A post-processor applied to all items placed in the inventory. */ | ||
public val itemPostProcessor: ((ItemStack) -> Unit)? = {} | ||
) |
9 changes: 1 addition & 8 deletions
9
interfaces/src/main/kotlin/com/noxcrew/interfaces/interfaces/PlayerInterface.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.