Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Additional API Events #800

Open
Valorless opened this issue Sep 17, 2024 · 1 comment
Open

[Suggestion] Additional API Events #800

Valorless opened this issue Sep 17, 2024 · 1 comment
Labels
area/mobs Monster types, behavior, abilities, configuration. type/enhancement New or improved feature.

Comments

@Valorless
Copy link

Feature request

Short description

Additional API events which our plugins can listen to :)
Like for example:

  • ArenaLobbyStart - When the lobby is created. Where ArenaStartEvent would act as ArenaLobbyEnd.
  • ArenaPlayerLobbyJoin - When a player joins the lobby. (Does ArenaPlayerJoinEvent already do this?)
  • ArenaPlayerClassSelect - When a player selects a class. One of the return variables would be the name of the class.
  • ArenaPlayerSpectate - When a player starts spectating, doesn't trigger on death in the arena.
  • ArenaBossAbilityEvent - When a boss ability is used.

Implementation details

ArenaLobbyStart

Function Returns Description
getArena() Arena Returns the arena in question.

ArenaPlayerLobbyJoin

Function Returns Description
getArena() Arena Returns the arena.
getPlayer() Player Returns the player.

ArenaPlayerClassSelect

Function Returns Description
getArena() Arena Returns the arena.
getPlayer() Player Returns the player.
getClass() ArenaClass Returns the chosen class.

ArenaPlayerSpectate

Function Returns Description
getArena() Arena Returns the arena.
getPlayer() Player Returns the player.

ArenaBossAbilityEvent

Function Returns Description
getArena() Arena Returns the arena.
getBoss() MABoss Returns the Boss.
getAbility() Ability Returns the ability.
getTarget() Player Returns the boss' target, if any.

Additional info

We spoke about it briefly on Discord :)

@garbagemule garbagemule added type/enhancement New or improved feature. area/mobs Monster types, behavior, abilities, configuration. labels Sep 29, 2024
@Valorless
Copy link
Author

I thought I'd add it here too, copied from Discord

ArenaLobbyStart

The way I go about with my plugin, is to create an "arena instance" inside my plugin using ArenaStartEvent, which is thrown when the arena starts and not created.
Due to this I'm unable to do any checks until the arena is started.
Dont think this event should be cancellable personally.

ArenaPlayerLobbyJoin

I could use this to send customized titles, and add effects while players are in the lobby.
As stated, I'm unsure if ArenaPlayerJoinEvent already does this, but without ArenaLobbyStart, I currently cant use that 😅
I guess this could be cancelled, which would cancel the player joining the lobby.
(Like if a player or group cant use a specific arena)

ArenaPlayerClassSelect

I could use this to add sounds when classes are selected, and also heal players which gets the Health Boost effect, as Minecraft doesn't do this by default.
I could also use it to send the specific player information regarding the class, to not have a wall of signs ^^
Cannot be cancelled, would only be used to get info.

ArenaPlayerSpectate

I cant currently think of a way to utilize this one atm, but thought it might be useful for something in the future :)

ArenaBossAbility

I could use this to optionally show titles or play sound effects for the ability.
I could also use it for example, if the lobby has a specific class, they could negate specific abilities.
Can be cancelled, which would act like essentially shooting blanks.
No ability is used, but the ability cooldown still triggers.

While these do benefit me, I thought of them with potential future plugins in mind, by myself or others :)
As I have fuckall clue whether or not these are difficult to make, I have no issue if they can't be done, but would appreciate them ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mobs Monster types, behavior, abilities, configuration. type/enhancement New or improved feature.
Projects
None yet
Development

No branches or pull requests

2 participants