itsme-to / ItsMyConfig

A plugin that facilitates the work of configurators and adds functionalities to customize each message.
https://docs.itsme.to/itsmyconfig
Other
5 stars 4 forks source link

add support for diferent yaml files, and update allow_items_edits #9

Closed Zarkness closed 5 months ago

Zarkness commented 5 months ago

This Pull Request adds support for different YAML files in the system, enabling greater flexibility in configuration. Additionally, it updates the allow_items_edits function to reflect these changes and ensure consistent editing of items. This enhancement will streamline configuration management and customization, enhancing user experience and code maintainability.

iiAhmedYT commented 5 months ago

Thank you so much for contributing to ItsMyConfig ❤️

I'm sorry for taking time on this but I'm not home at the moment (or not for the next ~week)

We have Item translation disabled for a good reason, It's very exploitable (like in anvils and other places /lore and /rename commands as well). We are looking for a good solution for it not to be exploited by anybody. however till then we don't want any server to enable it and cause them trouble because of it.

As for the rest It seems nice even though you totally ignored code-style

I still didn't give it as much of a look because of my limited time sadly, I will look into it soon 🙏

Zarkness commented 5 months ago

Thank you so much for contributing to ItsMyConfig ❤️

I'm sorry for taking time on this but I'm not home at the moment (or not for the next ~week)

We have Item translation disabled for a good reason, It's very exploitable (like in anvils and other places /lore and /rename commands as well). We are looking for a good solution for it not to be exploited by anybody. however till then we don't want any server to enable it and cause them trouble because of it.

As for the rest It seems nice even though you totally ignored code-style

I still didn't give it as much of a look because of my limited time sadly, I will look into it soon 🙏

it's all right when you can and without haste,

Item Translation: I didn't know there were such problems with it and being the true/false option by putting a comment as a warning would be, I can't think of a good solution since I don't know how exploitable it is apart from what you just told me, I had put it since I thought it was a very good option, the utility that I am giving it right now is for my lobby for the item that gives you the ajparkour when you enter the parkour so I can use the hexadecimal codes, gradients and put the prefix placeholder in the item, that's why I had put the option of true/false in the config. yml

Code style: sorry for ignoring the style of the code as I am a newbie in programming I asked chatgpt for some help, if you want to tell me what are the parts that are not quite the style of the code and what is missing or what is wrong and try to adjust them.

iiAhmedYT commented 5 months ago

Hmm why is the change of gradle.bat anyway?

infact you deleted the gradlew file too

Zarkness commented 5 months ago

Hmm why is the change of gradle.bat anyway?

infact you deleted the gradlew file too

Again sorry for replying so late, I at first what I did was to test if it compiled and it gave me error and to fix the problem what I did was a gradle wrapper and that's what it did when I put the command, if you want I revert the commit or pull request without that, just adding support for other .yml files.

iiAhmedYT commented 5 months ago

I might need you to explain to me how the structure of those files will look

Zarkness commented 5 months ago

I might need you to explain to me how the structure of those files will look

the structure of the other .yml files is the same as the config.yml only removing symbol-prefix, debug and allow-items-edits, here is an example


custom-placeholder:
  example-requirement:
    value: "&aRequirement passed !"
    requirements:
      haveMoney:
        type: ">="
        input: "%vault_eco_balance%"
        output: "100"
        deny: "Don't have enought money"
  example-prefix:
    value: "&a&nPrefix"
custom-progress:
  example-progressbar:
    symbol: "⦁●⚫●⚫●⚫●⚫●⚫●⚫●⚫●⚫●⚫●⚫●⦁"
    completed-color: "&a"
    progress-color: "&e"
    remaining-color: "&7"
iiAhmedYT commented 5 months ago

Alright few things before merging,

1- Let's disable items back please and remove the config for them 2- You need to check if there is any placeholder conflict and adding a warning in console for it 3- Can you improve some of the nesting in your code? and maybe follow code-style on your way by using finals and proper spacing :D