TRCStudioDean / LiteCommandEditor

Bukkit/Spigot plugin LiteCommandEditor
3 stars 0 forks source link

question #1

Open Zarkness opened 1 month ago

Zarkness commented 1 month ago

I need help on how to create a command with arguments and each argument has subarguments, for example I am trying to make a command that is /setup and I want that if I put only /setup it will send me an error message saying that arg 1 is missing, then if I put /setup arg1 it will have its own args and the same if I put /setup arg2 and each one if its subargument is missing it will send its own error message and the same if inside arg1 a subargument has subarguments.

Apart from the tab completer showing me all args and subargs etc....

example of command:

    /setup arg1
        test
            subtest
        test2
        test3
Zarkness commented 1 month ago

Now you can use this placeholder {color:[text]}, all color symbols and hexadecimal colors in [text] will not be automatically converted. See wiki for details.

Okay, how about this?

I'll test the version later and let you know if I found any bugs.

Zarkness commented 1 month ago

and the itsmyconfig plugin with the prefix?

Zarkness commented 1 month ago

I just tried the latest version and it returns the photo.

image

Zarkness commented 1 month ago

image

I just tried the latest version and it gives me back the picture but if the value is a hexadecimal color and I use it in the command I told you I get this.

I don't understand why you have to complicate so much the plugin that put you as an example the conditionalevents, it does not compile it to base64 and then decompile it.

What I did was this, I used to have [3] and I changed it to {color:[3]}:

Enabled: true
Prefix: 'Hylarion'
Name: 'testsetup'
Permission: litecommandeditor.customcommand.example

Command-Executor:
    'Case1':
        Conditions: 
        - '{sender_type} != Player'
        Break: true
        Messages: '&cYou must be a player!'
    'Case2':
        Conditions: 
        - '{length} >= 2'
        - '[1] == user'
        - '[2] == accent'
        Break: true
        Functions:
            'Case1':
                Conditions:
                - '{length} == 2'
                Break: true
                Messages: 
                - '&c&m                    &r &c&lERROR! &c&m                    '
                - '&cFalta el argumento prueba con un codigo de color, ya sea legacy o hexadecimal o minimessage'
                - ''
                - '&c&m                                               '
            'Case2':
                Conditions:
                - '!Matcher:"^(#([A-Fa-f0-9]{6})|<color:(#([A-Fa-f0-9]{6})|([a-zA-Z_]+))>|&[0-9a-fA-F])$":[3]'
                Break: true
                Messages: 
                - '&c&m                    &r &c&lERROR! &c&m                    '
                - '&cPon un codigo de color valido, prueba con un codigo hexadecimal, MiniMessage o legacy'
                - ''
                - '&c&m                                               '
            'Case3':
                Commands: 'server:itsmymeta set {sender} user_accent_color {color:[3]}'
                Messages: 
                - '$%itsmymeta_prefix% %itsmymeta_server_name_color_efault% #0055FFAhora estas usando el color &e{color:[3]}'
                - '{color:&aThis is an article with color retention [3]}'
    'Case3':
        Messages:
        - '&c&m                    &r &c&lERROR! &c&m                    '
        - '&cFalta el argumento prueba con un codigo de color, ya sea legacy o hexadecimal o minimessage'
        - ''
        - '&c&m                                               '

Tab-Completer:
    'Case1': 
        Conditions: '{length} == 1'
        Recipes: 'user'
    'Case2': 
        Conditions: '{length} == 2'
        Recipes: 'accent'
    'Case3': 
        Conditions: '{length} == 3'
        Recipes:
        - '&1'
        - '&2'
        - '&3'
        - '&4'
        - '&5'
        - '&6'
        - '&7'
        - '&8'
        - '&9'
        - '&0'
        - '&a'
        - '&b'
        - '&c'
        - '&d'
        - '&e'
        - '&f'
        - '&7'
        - '#FFFFEE'
        - '<color:#FFFFEE>'
TRCStudioDean commented 1 month ago

This is indeed a bug, please wait for it to be fixed

Zarkness commented 1 month ago

I know it's a bug, I'm waiting for you to fix the bug.

TRCStudioDean commented 1 month ago

When can you test it today? I am about to release a new version to fix this

Zarkness commented 1 month ago

When can you test it today? I am about to release a new version to fix this

I'm going to try it now, but I won't be home for another 7 or 8 hours.

Zarkness commented 1 month ago

When can you test it today? I am about to release a new version to fix this

I just tested it at least this fast and for the setup command, it works, now it would be missing what I told you about itsmyconfig and to be able to make an announcement command.

If you want when I get home, I'll test it thoroughly and let you know.

Zarkness commented 1 month ago

also minimessage color formats are still not supported.

Zarkness commented 1 month ago

I hope you don't mind, but I'm getting tired of finding bugs in every single thing I do with your plugin, now for example if I use the itsmyconfig placeholder Color-Code-Show-Primary, whose value is %utils_parse_changeoutput_contains_input:{itsmymeta_user_user_primary_color}_matcher:#_ifmatch:{formatter_text_replace_#_#_#&r_{itsmymeta_user_user_primary_color}}_else: {changeoutput_contains_input:{itsmymeta_user_user_primary_color}_matcher:color_ifmatch:{formatter_text_replace_color:_&&r_{itsmymymeta_user_user_primary_color}}_else:{changeoutput_contains_input: {itsmymeta_user_primary_color}_matcher:&_ifmatch:{formatter_text_replace_&_&&r_{itsmymeta_user_primary_color}}_else:not working}}% I have to put the command twice because the first time in the message I get the color code I used before and the second time I get the correct color code, and this probably can be used in another context and the same thing happens.

TRCStudioDean commented 1 month ago

Sorry, I forgot to tell you something earlier. LCE's development plan is to improve the plugin's functionality during the snapshot phase, and we need to release the official version as soon as possible. As for the compatibility of other plugin functions, we need to wait until the official version is released before gradually releasing them. So you will find that most of the content I updated during the entire snapshot period was to improve and optimize the plugin itself.

The other plugin features (or their related expressions) you mentioned, such as minimessage and itsmymeta, can only be implemented after the official version. Currently, what LCE needs to do is to develop them conservatively rather than aggressively expanding their functionality.

Zarkness commented 1 month ago

okey

TRCStudioDean commented 1 month ago

Anyway, thank you for providing LCE with a wealth of valuable intelligence during this period, which has facilitated its better development during the snapshot version. Thank you for patiently accepting it. As the main developer of the project, I am extremely grateful. :)

Zarkness commented 1 month ago

You are welcome, I had patience because you are a very nice and friendly dev, besides the plugin if you get along well, and add missing things and fix other things, it should allow you to do any kind of command from the simplest to the most complicated ones.

There are some things that need to be fixed, for example plugins like itsmyconfig and runway that allow you to add support for placeholderapi, and minimessage in places where they don't support it.

Apart from the delay in placeholders like the previous one

TRCStudioDean commented 1 month ago

Yes, because the code related to Placeholder API is ready-made code that I moved from the previous plugin project, it was able to receive support in the first snapshot version. I am developing this type of plugin for the first time, so I also need to learn and understand through continuous communication. Thank you for your understanding.

Zarkness commented 1 month ago

it is understandable, by the way then now as soon as the stable version comes out, you will put it open source?

TRCStudioDean commented 1 month ago

Yes, you can find my explanation in the README

Zarkness commented 1 month ago

ok, by the way what I had told you about being able to do commands with ads, will you add that after the stable version is released?

TRCStudioDean commented 1 month ago

Are you referring to /announcements [text...] ? this solution may be released during the snapshot version, you can pay attention to the update log

This requires a feature that can connect multiple args or manipulate strings, and I am thinking about how to design it

Zarkness commented 1 month ago

Are you referring to /announcements [text...] ? this solution may be released during the snapshot version, you can pay attention to the update log

This requires a feature that can connect multiple args or manipulate strings, and I am thinking about how to design it

ok, by the way what I had told you about being able to do commands with ads, will you add that after the stable version is released?

and you could add in the snapshots the minimessage support and fix the error with plugins like itsmyconfig or runway? is that in the command messages especially in the prefix I use gradient and it looks ugly.

image

Zarkness commented 1 month ago

another thing the json component doesn't work, the hover works but the click and others don't work.

TRCStudioDean commented 1 month ago

another thing the json component doesn't work, the hover works but the click and others don't work.

How did you configure it?

Zarkness commented 1 month ago

image as in the picture, even the default ones that the plugin brings by default don't work either, at least in version 1.20.4 which is the one I'm in.

TRCStudioDean commented 1 month ago

I will test it tomorrow

Zarkness commented 1 month ago

okey

TRCStudioDean commented 1 month ago

I tried, both hover event and click event can work, perhaps there is a problem with your client? Tested in Paper 1.20.4

Zarkness commented 1 month ago

I use this modpack https://modrinth.com/modpack/arcomua the strange thing is that the symbol-prefix of itsmyconfig allows you to use all the minimessage including hover and its actions, and that one works for me, instead yours is the one that doesn't work for me.

I'm sorry for taking so long to answer yesterday, I had a busy day. @TRCStudioDean

https://github.com/user-attachments/assets/42fc69bf-0a4e-4079-a9b0-1816f80fe8b8

TRCStudioDean commented 1 month ago

I have been busy lately, updates need to be postponed

Zarkness commented 1 month ago

no problem

Zarkness commented 3 weeks ago

Hi, is there any news on all this?

TRCStudioDean commented 3 weeks ago

I am accumulating updates

TRCStudioDean commented 3 weeks ago

Hi, in snapshot 14 version, I have initially implemented compatibility for MiniMessage partial tags (which I call "pseudo MiniMessage"). This is a testing feature, and I hope you can help me test it for improvement. ;)

Please note that this version has undergone some functional adjustments. I suggest you read this update log before updating and using: https://www.spigotmc.org/resources/117987/update?update=558887 (<-- There are relevant screenshots here)

Zarkness commented 3 weeks ago

ok, as soon as I wake up at 0:33 a.m., I'll try it and let you know if I find any problem.

Zarkness commented 2 weeks ago

what I tested works well, the only thing that annoyed me is a system that does not support all the features such as decorations, but otherwise the gradient works for me.

TRCStudioDean commented 2 weeks ago

what I tested works well, the only thing that annoyed me is a system that does not support all the features such as decorations, but otherwise the gradient works for me.

We will continue to improve this feature in the future. You can provide a relevant configuration file, which I can also use as a test sample during the development process.

Do you have any other questions?

Zarkness commented 2 weeks ago

yes about the other suggestions you had given, when will they be added?