mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
v1.8.1
fix weird bug where the viewer list is empty sometime apparently
This commit is contained in:
parent
c5c32ce386
commit
482d5eb66d
2 changed files with 4 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ plugins {
|
|||
}
|
||||
|
||||
group = "xyz.alexcrea"
|
||||
version = "1.8.0"
|
||||
version = "1.8.1"
|
||||
|
||||
repositories {
|
||||
// EcoEnchants
|
||||
|
|
@ -29,7 +29,7 @@ dependencies {
|
|||
compileOnly("org.spigotmc:spigot-api:1.18-R0.1-SNAPSHOT")
|
||||
|
||||
// Gui library
|
||||
val inventoryFramework = "xyz.alexcrea.cuanvil.inventoryframework:IF-CustomAnvil:0.10.18"
|
||||
val inventoryFramework = "xyz.alexcrea.cuanvil.inventoryframework:IF-CustomAnvil:0.10.18.2"
|
||||
implementation(inventoryFramework)
|
||||
testRuntimeOnly(inventoryFramework)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package xyz.alexcrea.cuanvil.listener
|
||||
|
||||
import com.github.stefvanschie.inventoryframework.util.InventoryViewUtil
|
||||
import io.delilaheve.CustomAnvil
|
||||
import io.delilaheve.util.ConfigOptions
|
||||
import io.delilaheve.util.EnchantmentUtil.combineWith
|
||||
|
|
@ -42,7 +43,7 @@ class PrepareAnvilListener : Listener {
|
|||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
fun anvilCombineCheck(event: PrepareAnvilEvent) {
|
||||
// Should find player
|
||||
val player: HumanEntity = event.viewers.first()
|
||||
val player: HumanEntity = InventoryViewUtil.getInstance().getPlayer(event.view)
|
||||
|
||||
// Test if the event should bypass custom anvil.
|
||||
if (DependencyManager.tryEventPreAnvilBypass(event, player)) return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue