-
-
Notifications
You must be signed in to change notification settings - Fork 998
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 kits subfolder to allow for multiple kit files #4407
Merged
Merged
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
This would in part resolve some (but not all) of #3944 |
…l Essentials kits to use a subfolder
…nvert all Essentials kits to use a subfolder" This reverts commit fe8e8df.
re: ESSX Dev Discord talk
…enSecrets_2.x � Conflicts: � Essentials/src/main/java/com/earth2me/essentials/Kits.java
JRoy
reviewed
Aug 2, 2021
JRoy
previously approved these changes
Aug 2, 2021
mdcfe
previously requested changes
Aug 2, 2021
JRoy
previously approved these changes
Aug 2, 2021
# Conflicts: # Essentials/src/main/java/com/earth2me/essentials/Kits.java
JRoy
approved these changes
Oct 2, 2021
Thanks for your contribution! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
module: main
Issues or PRs for the main Essentials module
type: enhancement
Features and feature requests.
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.
Information
Details
Proposed feature:
Add to the existing kits system (not overhaul) and allow for server owners to have the option of separating kits out into individual files for storage or organization purposes. The separated kits would be stored in a folder aptly named "kits", inside of the Essentials data folder (
Essentials/kits
)kits.yml
kits.yml
has not been changed, must still stay in the main Essentials directoryconfig.yml
called "use-kits-subfolder" which defaults to false. Can be set to true if server owner wishes for the folder to be created and parsed. If false, any files in the folder will not be read by the plugin (or loaded, to save memory)..yml
files, and if the yml files do not contain a "kits" section, it will throw an error in the console and alert the server owner to which file is incorrectly definedThe driving factor behind this is that our large server network has held a custom fork of ESSX for this for years, and the sole reason of us updating our own fork is simply for a kits subfolder. I ran a count and of all parsed kits we have around 1400 it seems, and the kits file would be absolutely tremendous and a nightmare to sort through. It still is sometimes cause it's still tens of thousands of lines long on its own. However in the kits folder we keep them organized based on many factors; kits based on classes, spells, food, donor items, etc, you name it. 208 files and counting in the folder. We are looking to get rid of how many custom plugins or forks we're having to constantly maintain and upkeep at the slightest server version change so I'm creating this PR because I know it will help us tremendously and if it's helped us (and my brain for sake of organization) then I know it's bound to help someone else.
Note: I'm no pro with Configurate, so should something in the format have the chance to be better optimized, please do advise. Thanks!
Environments tested:
OS:
Developed on Windows (x64, using IntelliJ Idea, jdk 1.16)
Tested on Linux (amd64, 8 cores, 1.8.0 java built 11)
Java version:
16.0.2
CraftBukkit/Spigot/Paper 1.12.2CraftBukkit 1.8.8Demonstration:
config.yml
via enabling the new option "use-kits-subfolder" and setting it to "true" (default is false). Once true, it will create a kits folder as seen in the picture below