Arnuh / ArmorEquipEvent

62 stars 43 forks source link

Not working on 1.16.1 #29

Open ArnyminerZ opened 4 years ago

ArnyminerZ commented 4 years ago

I'm currently running org.spigotmc:spigot:1.16.1-R0.1-SNAPSHOT as library, and can't manage to get the library working, I am using the following code for the onEnable method (I'm using Kotlin):

override fun onEnable() {
    logger.info("Registering listeners...")
    ArmorEquipListener(this)
}

and on the ArmorEquipListener:

class ArmorEquipListener(private val plugin: Plugin) : Listener {
    init {
        plugin.server.logger.info("   Registering ArmorEquipListener...")
        plugin.server.pluginManager.registerEvents(this, plugin)
    }

    @EventHandler
    fun onArmorEquip(event: ArmorEquipEvent) {
        plugin.server.logger.info("Got armor equip event")

        val player = event.player
        player.sendMessage("Wore armor!")
    }
}

Is the plugin incompatible with 1.16, or am I doing something wrong? Thank you

boddahburnout commented 4 years ago

I was able to use it with no real issue, did you forget to register the event?