PrisonTeam / Prison

The home of the Prison project, a Minecraft plugin to provide mining and ranking gameplay experience.
https://www.spigotmc.org/resources/prison.1223/
Other
131 stars 48 forks source link

GUI lores should not be forced in config file #242

Closed Josh65-2201 closed 1 year ago

Josh65-2201 commented 1 year ago

Which module are you submitting this issue for?

Core

Describe the issue you are experiencing.

I don't want description for my mines, ranks or prestige's but when deleting them from the GUI config they just get added back adding extra length to the file.

Describe the steps to reproduce the problem.

  1. Open the GUI config
  2. Delete rank a and z description.
  3. Reload the GUI in game
  4. See the descriptions are added back

Anything else we need to know?

GABRYCA commented 1 year ago

Hi, Have you tried instead of deleting the description to set them to an empty line? Like: "sometext" to ""

It shouldn't be visible.

Josh65-2201 commented 1 year ago

I have done that. but would still make sense not to readd them.

rbluer commented 1 year ago

Thanks for the suggestion Josh. Thanks for taking the time to suggest it.

Please visit our discord server for quicker responses to issues. This is something I'd like to talk to you about to help ensure any changes I make are inline with what you are suggesting. Go ahead and create a new thread under support and then feel free to ping me on that thread: @RoyalBlueRanger

I'm not sure exactly what you're talking about as far as what's going on in the GUIs. I'll have to see if I can reproduce it.

rbluer commented 1 year ago

I've made changes to how the player's gui mine menu works. That menu had within the guiConfig.yml file, sections for configuring the "global" mines lore, plus it supported custom lore for any specific mine too. I was thinking that I did not add this support in the past, so I apologize that I was thinking it would need to be added. It does not.

But, what the issue was, was that the player's gui prison menu generator was injecting some lines within the LORE that were not represented by the guiConfig.yml file. Example, it was adding one line for the mine's name, then the mine's tag. Then it was adding the configurable LORE. Then it was adding "click to teleport" and also it added if the mine was locked or unlocked to the player. All that hard coding was removed.

Instead, I added new placeholders that will allow all the lore lines to be fully customized now.

For the player's gui ranks menu, I added support to show the list of all mines that are linked to each rank. The placeholder was there in the documentation, but there was no code to provide that listing.

For the player's gui mines menu, I added the following placeholders: {clickToTeleport} {lockStatus} {playerCount} {linkedRank}

Note that player count is only updated when the menu is generated. It will not dynamically update while the menu is open.

If the EditableLore.Mines section in the guiConfig.yml is deleted, then upon reloading the gui configs, or restarting the server, prison will regenerate that section with the new default values. It is strongly suggested that everyone resets this section so the new format will be loaded.

Just to be perfectly clear, the editable lore in the player's gui menus ONLY applies to the player's menu. The admin menus will never have customizable lore since that is beyond the purpose of those menus. If you need more admin details, then it's advisable not to use the admin GUIs, but instead use the following two commands within the console: /ranks info <rankName> all /mines info <mineName> all

I'm closing this issue because the stated problem has been fixed and it will appear in the next alpha release, and the all future releases too.

Thanks greatly for bringing this to my attention. Hope this helps you customize everything the way you were wanting it to be.