EternalCodeTeam / EternalCombat

⚔ Combat Logging system for Minecraft!
https://eternalcode.pl
Apache License 2.0
16 stars 6 forks source link

Event-based API. #104

Closed NotAlexNoyle closed 1 year ago

NotAlexNoyle commented 1 year ago

Is your feature request related to a problem? Please describe. I would like to change properties of other plugins on my server when players are in combat. For example, if a player is in combat, I want to turn off their particle cosmetics, and turn off the "anti-knockback" effect that netherite armor has. Instead of hooking into various plugin APIs in EternalCombat (which can get messy), I suggest implementing an event-based API that can be called from third party plugins.

Describe the solution you'd like Event: playerEnteredCombat - triggered when a player enters combat mode Functions: getPlayer(), getOpponents() Event playerLeftCombat - triggered when a player is released from combat mode Functions: getPlayer(), getVictims()

Describe alternatives you've considered Supporting my plugins inside of EternalCombat itself (harder to maintain)

Additional context An example of an event-driven API provided by a plugin can be found here under Apache 2.0 License.