File tree 3 files changed +14
-5
lines changed
src/main/kotlin/me/tech/mcchestui/listeners
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ repositories {
21
21
}
22
22
23
23
dependencies {
24
- implementation(" com.github.DebitCardz:mc-chestui-plus:1.4.7 " )
24
+ implementation(" com.github.DebitCardz:mc-chestui-plus:1.4.9 " )
25
25
}
26
26
```
27
27
### Maven
@@ -34,7 +34,7 @@ dependencies {
34
34
<dependency >
35
35
<groupId >com.github.DebitCardz</groupId >
36
36
<artifactId >mc-chestui-plus</artifactId >
37
- <version >1.4.7 </version >
37
+ <version >1.4.9 </version >
38
38
</dependency >
39
39
40
40
```
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ val githubActor = project.findProperty("gpr.user") as String? ?: System.getenv("
8
8
val githubToken = project.findProperty(" gpr.key" ) as String? ? : System .getenv(" GITHUB_TOKEN" )
9
9
10
10
group = " me.tech"
11
- version = " 1.4.7 "
11
+ version = " 1.4.9 "
12
12
13
13
repositories {
14
14
mavenCentral()
Original file line number Diff line number Diff line change @@ -17,14 +17,23 @@ internal class GUISlotClickListener(gui: GUI) : GUIEventListener(gui) {
17
17
val guiSlot = gui.slots.getOrNull(slot)
18
18
? : return // handle cancellation of task in onPlace.
19
19
20
- if (click == ClickType . DROP || click == ClickType . CONTROL_DROP ) {
21
- if (! guiSlot.allowPickup ) {
20
+ if (click in PICKUP_CLICK_ACTIONS ) {
21
+ if (! gui.allowItemPickup ) {
22
22
isCancelled = true
23
+ return
23
24
}
24
25
}
25
26
26
27
guiSlot.onClick?.let { uiEvent ->
27
28
uiEvent(this , whoClicked as Player )
28
29
}
29
30
}
31
+
32
+ companion object {
33
+ private val PICKUP_CLICK_ACTIONS = setOf (
34
+ ClickType .DROP ,
35
+ ClickType .CONTROL_DROP ,
36
+ ClickType .SWAP_OFFHAND
37
+ )
38
+ }
30
39
}
You can’t perform that action at this time.
0 commit comments