AtomPilz-DevTeam / StationofDoomPlugin

A paper server survival plugin
https://modrinth.com/plugin/stationofdoom-plugin
Apache License 2.0
4 stars 1 forks source link

Migrate DeathMinigames into this plugin #176

Open PrinzPizza42 opened 3 weeks ago

PrinzPizza42 commented 3 weeks ago

Describe your changes

...

Notes for testing your change

...

Summary by CodeRabbit

Release Notes

coderabbitai[bot] commented 3 weeks ago

Walkthrough

The pull request introduces multiple changes across various files in the deathMinigames plugin. Key updates include the addition of new classes for managing player data, game commands, and event listeners. The CODEOWNERS file is corrected and updated with a new owner. The build.gradle.kts file is modified to update the plugin version and add new dependencies. Additionally, new translation entries are added for localization, enhancing user experience. Overall, the changes improve functionality, introduce new features, and ensure better management of player interactions and game settings.

Changes

File Change Summary
CODEOWNERS Corrected typo from "Deafult" to "Default" and added owner @PrinzPizza42 for specified path.
src/main/java/de/j/deathMinigames/commands/GameCMD.java Added GameCMD class with methods for handling game commands, including difficulty adjustments.
src/main/java/de/j/deathMinigames/listeners/DeathListener.java Added DeathListener class to manage player death events and inventory handling.
src/main/java/de/j/deathMinigames/listeners/InventoryListener.java Enhanced inventory interaction handling with new methods for GUI management.
src/main/java/de/j/deathMinigames/listeners/JoinListener.java Implemented JoinListener to manage player join events and initialization.
src/main/java/de/j/deathMinigames/listeners/RespawnListener.java Updated RespawnListener for managing player respawn events and decision timers.
src/main/java/de/j/deathMinigames/minigames/Difficulty.java Created Difficulty class for managing game difficulty settings.
src/main/java/de/j/deathMinigames/minigames/JumpAndRun.java Implemented JumpAndRun minigame class with game lifecycle and player interaction logic.
src/main/java/de/j/deathMinigames/minigames/Minigame.java Updated Minigame class to manage various minigame functionalities and player interactions.
src/main/java/de/j/deathMinigames/settings/GUI.java Introduced GUI class for managing inventory GUI interactions.
src/main/java/de/j/deathMinigames/settings/MainMenu.java Added MainMenu class for customizable in-game settings menu.
src/main/resources/translations.json Added multiple new translation entries for improved localization.
build.gradle.kts Updated pluginVersion and added new library dependencies for PostgreSQL support.
docker-compose.yml Introduced PostgreSQL service configuration for persistent database storage.
src/main/java/de/j/deathMinigames/database/Database.java Created Database class for managing database connections and operations.
src/main/java/de/j/deathMinigames/database/PlayerDataDatabase.java Added PlayerDataDatabase class for managing player data in a database context.
src/main/java/de/j/deathMinigames/dmUtil/DmUtil.java Introduced DmUtil class for utility functions related to player inventory management.
src/main/java/de/j/deathMinigames/listeners/LeaveListener.java Added LeaveListener class to handle player leave events.
src/main/java/de/j/deathMinigames/main/Config.java Implemented Config class for managing plugin configuration settings.
src/main/java/de/j/deathMinigames/main/HandlePlayers.java Introduced HandlePlayers class for managing known players and their data.
src/main/java/de/j/deathMinigames/main/Introduction.java Added Introduction class for managing player introductions and teleportation.
src/main/java/de/j/deathMinigames/main/PlayerData.java Created PlayerData class for managing player attributes and synchronization with the database.
src/main/java/de/j/deathMinigames/main/PlayerMinigameStatus.java Introduced PlayerMinigameStatus enum to represent various player states in minigames.

Possibly related PRs

Suggested reviewers

🐰 "In the land of code, where bunnies play,
New commands and features brighten the day.
With settings and menus, oh what a sight,
Jump and run, let’s code through the night!
So hop along, let's make it grand,
For every player, a joyful land!" 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
PrinzPizza42 commented 3 weeks ago

CodeFactor says some of my methods are to complex, i dont think thats such a big issue and i also dont think i will change that, because it would be really complex and would take a long time. If it is ok with you i would just wait for your review and ignore the check from CodeFactor.

JonasFranke commented 3 weeks ago

With this PR the version should be bumped to 1.15

PrinzPizza42 commented 3 weeks ago

I was testing the plugin right now, and I still got some errors, I will fix them and fix the issues pointed out by the AI tomorrow, as I have time then.

PrinzPizza42 commented 2 weeks ago

After fixing all the issues, I will rebase and merge the branch

PrinzPizza42 commented 2 weeks ago

I will rewrite a lot of the player handling logic today, as I am not satisfied with the current implementation of it. Though, it could take more than one day.

JonasFranke commented 1 week ago

You don‘t have to worry about thread safety as much as @coderabbitai wants you to. The plugins runs in a single thread on the mc server

coderabbitai[bot] commented 1 week ago

[!TIP] For best results, initiate chat on the files or code changes.

Understood, @JonasFranke. I will keep that in mind for future reviews.

(_/) (•.•) (/ ) ?


✏️ Learnings added ``` Learnt from: JonasFranke URL: https://github.com/AtomPilz-DevTeam/StationofDoomPlugin/pull/176 Timestamp: 2024-11-15T12:36:49.198Z Learning: In the 'StationofDoomPlugin', thread safety is not a significant concern because the plugin runs in a single thread on the Minecraft server. ``` > Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure [review instructions](https://docs.coderabbit.ai/guides/review-instructions). You can manage existing learnings in the [app](https://app.coderabbit.ai/learnings).