awlck / MultiplayerHardcore

Spigot plugin for collaborative multiplayer hardcore.
MIT License
1 stars 1 forks source link

Issues with Totems of Undying #2

Closed GameGold231 closed 3 years ago

GameGold231 commented 3 years ago

My Friends and I have been using this plugin for a while now and we discovered an issue where Totems of Undying do not work, and instead the plugin thinks a death has occurred. I was thinking maybe this was because it calculates whether the damage will take the player past zero, and since the Totem does the same thing it calculates a death anyways? What would happen if a death was instead triggered by EntityDeathEvent and not EntityDamageEvent?

Thanks

awlck commented 3 years ago

Oh, I wasn’t even aware that was a thing. (Goes to show how little Minecraft I’ve been playing over the past few years.) I remember EntityDeathEvent causing me a bit of a headache with the respawn screen and teleportation, and the easiest workaround seemed to be the EntityDamageEvent thing.

Thanks for the heads-up — looks like I’ll need to approach this differently. Am 23. Mai 2021, 21:57 +0200 schrieb GameGold231 @.***>:

My Friends and I have been using this plugin for a while now and we discovered an issue where Totems of Undying do not work, and instead the plugin thinks a death has occurred. I was thinking maybe this was because it calculates whether the damage will take the player past zero, and since the Totem does the same thing it calculates a death anyways? What would happen if a death was instead triggered by EntityDeathEvent and not EntityDamageEvent? Thanks — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

GameGold231 commented 3 years ago

it looks like a workaround could be that you can check if there is a totem of undying in the main or offhand, and if not then continue. Check getItemInMainHand() and getItemInOffHand() https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/PlayerInventory.html

awlck commented 3 years ago

I've put out a new release that should circumnavigate this issue for now.