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

add context and switches to PlayerQuitEvent #2641

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Hydroxycobalamin
Copy link
Contributor

This PR modernizes the PlayerQuitEvent. Additionally to that it adds the following:

Switches

@Location true, requested by Chaps79 on Discord.
cause:<cause> to only process the event when it matches the specific cause (only on Paper).`

Context

<context.cause> returns an ElementTag of the cause of the quit (only on Paper)

The PaperImplementation makes also use of the non-deprecated Methods

  • quitMessage() to return the quit message
  • quitMessage(component) to set the quit message.





Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pile of stray space


public PlayerQuitsScriptEventPaperImpl() {
registerSwitches("cause");
this.<PlayerQuitsScriptEventPaperImpl>registerTextDetermination("none", (evt) -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it'd be redundant given the existing registration on none?

mcmonkey4eva
mcmonkey4eva previously approved these changes Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants