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

Bleeding #175

Merged
merged 247 commits into from
Nov 21, 2020
Merged

Bleeding #175

merged 247 commits into from
Nov 21, 2020

Conversation

rbluer
Copy link
Collaborator

@rbluer rbluer commented Nov 21, 2020

Pulling in the bleeding for the v3.2.2 bug fix. This resolves a lot of little issues and some significant blockers too. Contains improvements to usability and some core internal rewrites/updates to better deal with a more complex environment.
See the changelog between v3.2.1 release and the v3.2.2-alpha.14 release for full details on the numerous changes.
Some examples: major changes to command handler to add aliases to the commands and tab complete for all commands. also there has been a lot of significant work done to the GUI to provide more functionality and enhancements.

rbluer and others added 30 commits September 27, 2020 18:11
…es. This caused a failure during mine resets since that is not a valid block. That is redstone dust!

Fixed it so upon server startup, it will auto detect the use of this item in mines and convert it to REDSTONE_ORE.  Thus the mine will work and won't disable the mine.
Also I changed the BlockType to Item so it's still there, but it cannot be presented as a block in the /mines block search tool.
Changelogs:
- Added some commands guidebooks -> Some Ranks.
…block. Added support so if it is found in a mine upon server startup, it will change it to a double_nether_brick_slab.
…bviously will never work with mc versions < 1.16. Use at your own risk.

Added: ANCIENT_DEBRIS CRYING_OBSIDIAN NETHER_GOLD_ORE BASALT POLISHED_BASALT
NETHERITE_BLOCK BLACKSTONE POLISHED_BLACKSTONE CHISELED_POLISHED_BLACKSTONE
NETHER_BRICKS RED_NETHER_BRICKS CRACKED_NETHER_BRICKS CHISELED_NETHER_BRICKS
CRIMSON_PLANKS WARPED_PLANKS STRIPPED_CRIMSON_HYPHAE
STRIPPED_WARPED_HYPHAE NETHER_WART_BLOCK WARPED_WART_BLOCK
LODESTONE QUARTZ_BRICKS RESPAWN_ANCHOR SHROOMLIGHT CAMPFIRE SOUL_CAMPFIRE
SOUL_LANTERN SOUL_TORCH SOUL_SOIL TARGET TWISTING_VINES WEAPING_VINES
Not sure if they will actually work.  Obviously will never work with mc versions < 1.16.  Use at own risk.
…16 blocks appear to work in most circumstances.

Use at your own risk.
These blocks may not properly be spawned and may not be all blocks available for these versions.
v1.14 : BAMBOO, BAMBOO_SAPLING, BARREL, BELL, CAMPFIRE, CARTOGRAPHY_TABLE, COMOSTER,
FLETCHING_TABLE, GRINDSTONE, JIGSAW, LANTERN, LECTERN, LOOM, SCAFFOLDING,
SMITHING_TABLE, SMOKER, STONECUTTER, SWEET_BERRY_BUSH
v1.15 : BEE_NEST, BEEHIVE, HONEY_BLOCK, HONEYCOMB_BLOCK
…creen without a bunch of horizonal scrolling...

plus got rid of a few instances of Objects.requireNonNull() which throws exceptions, which are not being caught.  Which is also the wrong behavior to what we need here... if those configs are null, then instead of throwing exceptions, just move on to the next conditional in the if chain.
Should probably never use Objects.requireNonNull since it will crash prison and prevent intended functionality.  This should probably be removed from elsewhere.
…ayers to use this command since no-perm players can use /ranks and that just redirects to this command.

Removed admin features unless player has the ranks.list perm or they are op. The admin features are links to other internal commands.
…ren't still in the Ranks and Mines Configs, too many things missing which I can't access from there and I need.

Changelogs:
- GUI Language Messages Support
… instead it wouldn't, also removed unused references to the GuiConfig.

Changelogs:
- Should Create folder languages now
- Removed unused references to the GuiConfig
…mines.

This also fixes an issue with not being able to delete a mine: It deletes successfully, but is still active in memory.
…hem.

This is required for the future changes to support linking mines and ranks.
…igned a sort order, with even suppressing mines from being included in the output.

Mines list can now be sorted in six different orders: alpha, active, and now sortOrder (user defined order), all of which suppresses mines with a -1 for the sort orders. Plus those but with including the suppressed mines.
The default being sortOrder, but if no mines have been configured, then they all will have a sortOrder == 0, and then all will be sorted alphabetically within that grouping.
Changed the prison's GUI to display mines in the sortOrder, with suppression of the -1 sortOrder values.
Added to the commands list the mines rename command and added the template page which will be edited in the future like all the other ones

Changelogs:
- New Mines Rename Button in the MinesInfo Sub-GUI of Prison Gui.
- Added to the commands list the /mines rename command.
- New Editable messages for renaming rank tags or mines from the GUI, stored in the folder languages and the only file present for now.
- Minor code changes.
…that it was unable to create the required parent directory, so changed it to use the command that would create all missing directories instead of just the last one.
…pes either include or exclude the mines. There are no sort types that include all mines. But the function that performs the sorting based upon the sort type returns a collection that contains the included mines (sortOrder >= 0) and also a second collection that contains the excluded mines (sortOrder == -1).

The returned object, PrisonSortableResults, has helper functions to simplify integration in to the /mines list command.
…age. Moved the config to a class variable so it would only be loaded once.

This reduced the opening of a 39 mine GUI from 5.5 seconds down to 6 milliseconds for the offending function call.
Changelogs:
- New Ranks List - Docs
- New Ranks Players - Docs
- New Ranks Player - Docs
- New Ranks Promote - Docs
- New Ranks Set - Docs
Changelogs:
- Edited a typo
… when doing a /ranks demote with a player_refund. Works now, and the log entries are also correct.
…upon Vault's version. It appears like formerly deprecated functions have been disabled and does nothing now.

Made changes to inspect the version of vault that is being used, then properly target the correct function so it works properly with all versions of vault, including pre v1.4.0.
This bug fix is potentially a critical bug fix and may warrent publishing Prison release v3.2.2 to take care of this issue.
rbluer and others added 26 commits November 13, 2020 01:06
Changelogs:
- Refactoring and moved many configs into a new directory, so they're all in the same place now ready to become one... maybe
Changelogs:
- Refactoring and moved the eventhandler for chat to a single class
Changelogs:
- Many fixes to GUIs
…t.getOfflinePlayers() was returning either a null player, or a player had a name that was null.
…ting correctly and it was failing with total mine chance greater than 100 percent when it really wasn't. This was due to how the total chances were being calculated in different ways in different parts of the code. This fixes it by using the same process in all locations so its consistent.
Changelogs:
- Added many new messages to the MessagesConfig (messages config).
Changelogs:
- Some code refactoring.
- Added some comments.
Changelogs:
- All the actions while a GUI's enabled will call an activeGuiEventCanceller method
Changelogs:
- Some refactoring
- New method to open the prison gui /gui, this's still experimental and I don't know if it'll work, someone test it please!
…t, pulled prestige related commands in to their own command class and then conditionally register them if prestiges are enabled.
Fix usage of getting the current economy.
Changelogs:
- New common way to open GUIs
Changelogs:
- Many code changes.
- Edited configs and added a new SpigotConfigComponents class.
- Extracted common methods into configs classes.
- Removed Gui. before all the strings, it was kind of useless and also wrong formatted (unrelated GUI content under Gui. path keyword).
- SellAllConfig now's like the new config standard of the others updated configs.

NOTE:
- new paths will make many new lines into the old configs, this's a change that admins/server owners might need to see, it's recommended to delete the old messages config.
Changelogs:
- Removed rankupCommands preview from the ranks GUI, as it was ruining the whole lore experience of ranks.
…so remove the alias of "prisonmanager" for "gui".

It was reported that when a non-admin tried to use /mines that it was giving the error message assoicated with /gui.  Cannot see a direct relationship there, but hard linked /mines to /gui mines by calling the function directly instead of resubmitting the command.  Not sure if this fixes the issue, but I was unable to reproduce it.
Changelogs:
- Fixed Rename action from GUI
…ui commands. This allows them to be enabled on their own, or more importantly, prevent them from being registered if the modules are not loaded.
…istered. they are now registered within the function where the modules are registered to allow the related commands to either be registered or not, based upon the modules.

Refactored how some of the commands/configs are setup to be more flexible, or to better follow the standards of how prison has been instantiating them (ListenersPrisonManager).
@rbluer rbluer requested a review from GABRYCA November 21, 2020 23:55
@rbluer rbluer self-assigned this Nov 21, 2020
Copy link
Collaborator

@GABRYCA GABRYCA left a comment

Choose a reason for hiding this comment

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

Bug Release and some features.
I've been working on improving GUIs in recent times and many other things.

@rbluer rbluer merged commit 2996169 into master Nov 21, 2020
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