ShopGui-RedirectClick
ShopWorkAround in Config.yml
This works for a variety of Shop plugins however only shopguiplus was tested for its use.
The name of the shop plugin you use (Found in its plugin.yml) This will be used to hook into it during run time
This is used to get the items in the main ShopGUI page. By doing this, we can later link one of these shops to our custom menu.
Here you combine the layout path for all keys and their name. This allows us to check for item type and item name upon clicking. For example: shopMenuItems.%key%.item.name informs us of the layout, where key is a placeholder and servertools will take care of it.
Remapped Clicks
To remap the ShopGUI clicks to your own menu (deluxemenus, another plugin menu from command) do the following:
Name:
Specify the exact color code layout as in your ShopGUI config
CloseInvBeforeCommand:
Ensure the ShopGUI closes before the command is run
MakePlayerSayCommand:
Makes play send the message with your command.
This is sometimes required if the command does not click but DEBUG shows it has run
Command:
The command which will run upon clicking the specified item in the ShopGUI
ShopWorkAround:
Enabled: false
DEBUG: false
plugin: "ShopGUIPlus"
MenuNameInConfig: "shopMenuName"
KeysofItemsInConfig: "shopMenuItems"
NameOfItem: "shopMenuItems.%key%.item.name" # ex. &2&lFarming
RemappedClicks:
1:
name: "&c&lSpawners"
CloseInvBeforeCommand: true
MakePlayerSayCommand: true
command: "spawnershop"Example:
User opens /shop
User finds the spawner item named "&cSpawners"
User Clicks
ShopGUI closes
ServerTools runs command "/customspawnergui"
Player opens customSpawnerGui from another plugin without knowing it
Last updated