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 PlayerJoinEvent and broadcast join messages #46

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AzaleeX
Copy link
Member

@AzaleeX AzaleeX commented Dec 12, 2024

Introduced the PlayerJoinEvent class to handle player join events and broadcast customizable join messages. Updated the SpawnResponsePacketHandler to trigger and call the event while broadcasting the localized join message. Added a new localization key for the join message in the LanguageKeys class and language resource file.

@AzaleeX AzaleeX added Priority: Low Low-priority issues that can be addressed later. Status: Awaiting Review Issues waiting to be reviewed by the team. Category: Gameplay Issues related to gameplay mechanics and player interactions. Player in relations with the player labels Dec 12, 2024
Introduced the PlayerJoinEvent class to handle player join events and broadcast customizable join messages. Updated the SpawnResponsePacketHandler to trigger and call the event while broadcasting the localized join message. Added a new localization key for the join message in the LanguageKeys class and language resource file.
Updated the player join message placeholders in `fr_FR.ini` and `en_GB.ini` to use consistent formatting with parameterized placeholders like `{%0}`. This ensures proper rendering of dynamic player names across different languages.
Adjusted join message logic to handle empty custom messages and default to translated messages if necessary. Removed unnecessary spaces in language files for consistency and to align with formatting standards.
Moved player join logic from SpawnResponsePacketHandler to Player class, encapsulating it in the new `doFirstSpawn` method. Ensured `PlayerJoinEvent` uses `@NonNull` annotations for better null safety. This improves code maintainability and separation of concerns.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Gameplay Issues related to gameplay mechanics and player interactions. Player in relations with the player Priority: Low Low-priority issues that can be addressed later. Status: Awaiting Review Issues waiting to be reviewed by the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant