-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fixed many bugs in BuildBattle plugin #86
Merged
Lagggpixel
merged 12 commits into
Plugily-Projects:development
from
Waterman1001:master
Jun 28, 2024
Merged
Fixed many bugs in BuildBattle plugin #86
Lagggpixel
merged 12 commits into
Plugily-Projects:development
from
Waterman1001:master
Jun 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…explode and damage the arena.
…ferent places. Added bb menu command and used registerSpecialItem to fix.
…port to other players plots or outside the arena map, even during voting stage.
Lagggpixel
approved these changes
Jun 28, 2024
Thank you for your contributions. |
Tigerpanzer02
added a commit
that referenced
this pull request
Jul 9, 2024
Special thanks to https://github.com/Waterman1001 * Bump version from 5.0.7-SNAPSHOT1 to 5.0.8 * Fixed many bugs in BuildBattle plugin (#86) * Updated plugin.yml to prevent invalid file error on startup * Changed version of dependency MiniGamesBox to circumvent build issues * Fixed error in time change menu * Fixed issue with %player% placeholder (should be lowercase) * Bump version from 5.0.7-SNAPSHOT1 to 5.0.8 * Fixed problem in place rewards * Cancelled BlockExplodeEvent to prevent blocks such as Respawn Anchor explode and damage the arena. * Fixed BuildBattle menu item not working because API was used at 2 different places. Added bb menu command and used registerSpecialItem to fix. * Disabled enderpearl throwing while in arena because it allows to teleport to other players plots or outside the arena map, even during voting stage. * Changed back version number of MiniGamesBox to 1.3.10 * Fixed small error if non-player threw projectile. --------- Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com> * Bump version from 5.0.8 to 5.0.8-SNAPSHOT0 * fix: fixed ChunkManager.sendMapChunk * Bump version from 5.0.8-SNAPSHOT0 to 5.0.8-SNAPSHOT1 * Updated to minigamesbox 1.3.11 * Bump version from 5.0.8-SNAPSHOT1 to 5.0.8-SNAPSHOT2 * Update CHANGELOG.md --------- Co-authored-by: version-bump[github-action] <41898282+version-bump[github-action]@users.noreply.github.com> Co-authored-by: Onno <[email protected]> Co-authored-by: Lagggpixel <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi again, I have been working on resolving some bugs within BuildBattle that I found.
The most noticable error is the Menu Item not working when in-game, so it is impossible to open the BuildBattle menu for players.
I found out the reason for this is that BuildBattle uses the MiniGamesBox API at two different places regarding the menu item.
registerSpecialItems()
present inAdditionalValueInitializer.java
getMenuItem()
present inBaseArena.java
.The first use did not provide an InteractHandler to the item (it takes it from the
special_items.yml
config and this one is empty), while the second use did actually correctly provide an InteractHandler. However, since it was looped through the array of special items and as soon as a matching ItemStack was found, a menu item having no Interact Handler was picked by the loop and therefore the correct item was dismissed, making the menu item not work anymore.I have changed this now, such that the second use case is removed from the code and it only registers the menu item as a special item just like any other item. However, since the 'execute' path in
special_items.yml
needs to have some command, I also added an argument to the buildbattle command, namely /bb menu, which allows a player to open the BuildBattle menu. I then added this command argument to the config file and voila, once a player clicks the menu item (only while being in-game of course), the interacthandler properly fires and the Menu Item is fixed! :)Next to this change, some other fixes have been applied:
Hopefully these changes are welcome. I have worked quite a bit on them while trying to change as minimal as possible. Only the bare necessities should be fixed by this PR.
Thank you in advance! 😄