ChestCommands icon indicating copy to clipboard operation
ChestCommands copied to clipboard

Can't open GUIs inside of a GUI

Open TheSpotSMP opened this issue 3 years ago • 13 comments

Description

When trying to perform a command that would open another gui inside of a GUI it instantly closes.

How to reproduce

Add a GUI command into a chestcommands gui and click it.

Platform

  • Server version (output of /version): 1.16.5 Purpur
  • Chest Commands version (check with /cc): 4.0.4-SNAPSHOT-B75

Additional context

TheSpotSMP avatar May 05 '21 15:05 TheSpotSMP

Mine is the same. I can’t open the GUI of other plugins in the menu. I hope the author will solve this problem as soon as possible.

FZDNSZYT avatar Jul 12 '21 16:07 FZDNSZYT

If you want to open another chest commands GUI you can use:

  ACTIONS:
    - 'open: shop.yml'

But in terms of other plugin's' GUI, we'll just have to wait for the author to fix this.

headblockhead avatar Jul 23 '21 19:07 headblockhead

Yes, I did use ChestCommands to open the GUI of other plugins. I am in trouble, and the system prompts me to open it successfully. And there are sound effects, but the GUI interface will crash. Cannot be displayed.

FZDNSZYT avatar Jul 24 '21 02:07 FZDNSZYT

I haven't tested, but you might me able to use a Skript script that closes the chest commands GUI, waits 3 ticks and then opens the other plugin's GUI.

In theory it SHOULD work but I'm not sure if it would be possible to close the chest commands GUI with Skript.

Also what do you mean by this?


I am in trouble, and the system prompts me to open it successfully.

Is there some context I'm missing here?

If I make no sense (or get something wrong) in this reply, i'll make an edit when I have the chance.

Hope this helps!

On Sat, 24 Jul 2021 03:00 FZDNSZYT, @.***> wrote:

Yes, I did use ChestCommands to open the GUI of other plugins. I am in trouble, and the system prompts me to open it successfully. And there are sound effects, but the GUI interface will crash. Cannot be displayed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/filoghost/ChestCommands/issues/128#issuecomment-885985222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKKZP27B3SLG727USV74XLTZINENANCNFSM44FDSRQA .

headblockhead avatar Jul 26 '21 00:07 headblockhead

Have you tried using KEEP-OPEN: true? It will prevent Chest Commands from closing the GUI

filoghost avatar Jul 27 '21 06:07 filoghost

Thank you, I will try it later. thank you very much.

FZDNSZYT avatar Jul 27 '21 11:07 FZDNSZYT

Where can I download the script of the friend above, thank you

FZDNSZYT avatar Jul 27 '21 11:07 FZDNSZYT

ChestCommands is the best MENU plugin I have ever used. Dear author. Up to now, there is no MENU configuration interface that can match you. in my heart.

FZDNSZYT avatar Jul 27 '21 12:07 FZDNSZYT

Here is the script. I have tested it now.

command /openplugingui:
    description: Closes the inventory and opens another one
    trigger:
        close player's inventory
        wait 3 ticks
        make player execute command "say hello"

Here is the ChestCommand icon

open-plugin-menu:
  MATERIAL: barrier
  POSITION-X: 9
  POSITION-Y: 3
  NAME: '&cOpen Other Menu'
  LORE:
    - 'Opens another plugins gui'
  ACTIONS:
    - 'openplugingui'

headblockhead avatar Jul 27 '21 13:07 headblockhead

May I ask if I should add command /openplugingui: description: Closes the inventory and opens another one trigger: close player's inventory wait 3 ticks Where is the make player execute command "companions" script? When I put it in the menu file under the MENU directory, the following error occurred.

FZDNSZYT avatar Jul 27 '21 13:07 FZDNSZYT

FZDNSZYT issued server command: /chestcommands RELOAD [21:12:27 INFO]: [ChestCommands] Encountered 5 error(s) on load:

  1. The icon "command /openplugingui" in the menu "menu/example.yml" has an invalid attribute "description": unknown attribute.

  2. The icon "command /openplugingui" in the menu "menu/example.yml" has an invalid attribute "trigger": unknown attribute.

  3. The icon "command /openplugingui" in the menu "menu/example.yml" is missing the attribute "POSITION-X".

  4. The icon "command /openplugingui" in the menu "menu/example.yml" is missing the attribute "POSITION-Y".

  5. The icon "command /openplugingui" in the menu "menu/example.yml" is missing the attribute "MATERIAL".

FZDNSZYT avatar Jul 27 '21 13:07 FZDNSZYT

I'm sorry, I do not speak English. I use Google Translate to communicate with you. There may be obstacles, I'm really sorry.

FZDNSZYT avatar Jul 27 '21 13:07 FZDNSZYT

Sorry, I wasn't very clear with the previous comment, there is a separate plugin called "Skript" at this website and i wrote a file for that. After installing the plugin, place the file below in your minecraft server at "/plugins/Skript/scripts/openplugingui.sk" then start the server. then it should work.

command /openplugingui:
    description: Closes the inventory and opens another one
    trigger:
        close player's inventory
        wait 3 ticks
        make player execute command "say hello"

headblockhead avatar Jul 27 '21 14:07 headblockhead