An error occurred during the
`EntityDeathEvent` when attempting to use the
`sendActionBar` method on a
`Player`. This was due to the
`sendActionBar` method not being available in certain Bukkit API versions, causing a
`NoSuchMethodError`.
The issue arose because the
`sendActionBar` method is not present in Bukkit versions prior to 1.19. To address this, different methods were used based on the server version:
For Versions 1.18 and Below: Used reflection to send
`ActionBar` messages via
`PacketPlayOutChat`. -
For Versions 1.19 and Above: Used the new API method
`sendActionBar`. This adjustment ensures compatibility of the plugin across various Minecraft versions.