Config Commands

MythicMobs Recommended: Use this external plugin to get the most out of this feature.

Edit the commands run by the container and its slots.

/goop containers config commands <container> <slot> [onStore/onTake] <command...>

Slots can run a list of commands (As of GooP 1.10) when interacted with.


This supports PlaceholderAPI, but there are a few built-in placeholders ready for you to use. Drop down these menu to read them, they are plenty!

Available for all containers.

  • %goop_container_internal% The internal name of the template of the container.

  • %goop_container_name% The display name of the template of the container (color codes not parsed yet).

  • %goop_container_observer% Name of the player that parses PAPI placeholders


Personal containers.

  • %goop_container_owner% UUID of the owner of this container.


Physical containers.

  • %goop_container_owner% UUID of the owner of the protection of the container, "null" if unprotected.

  • %goop_container_x% Location coordinate X

  • %goop_container_y% Location coordinate Y

  • %goop_container_z% Location coordinateZ

  • %goop_container_world% Location world name

  • %goop_container_location% Location coordiantes X Y Z separated by spaces

  • %goop_container_location_comma% Location coordiantes X,Y,Z separated by commas

Putting an item in this slot will calculate the price of the deconstructing operation, and taking it out will reset the calculations.

Args Breakdown (What everything does)

<container>


<slot>

  • Slot number that you want to edit. Always a positive integer number.

  • Use the onClose keyword to not bind the command to a slot, but to when the player closes the container.

  • Use the onOpen keyword to not bind the command to a slot, but to when the player opens the container.


[onStore/onTake]

  • Optional if adding commands to storage slots (where players can put items into).

    • Use the onTake keyword to run commands when the player removes the item in the slot.

    • Use the onStore keyword to run commands when the player puts an item into the slot.


<command...>

  • Command that this slot will run, will be added to the list.

    • You can see the commands already in the list using /goop containers config view

    • Use the clear keyword to remove all commans from the list

    • Use the remove.N keyword to remove one command from the list, where N is its index (positive integer).

Tips

  • If a storage slot has both onStore and onTake commands, and the player swaps an item for another item...

    • The onTake commands run, and immediately after the onStore commands run.



  • There are five total ways this command can bind commands:

    • onOpen Command runs when the container is opened (not bound to a slot)

    • onClose Command runs when the container is closed (not bound to a slot)

    • onClick Command runs when a player clicks a slot.

    • onTake Command runs when a player takes the item in a slot.

    • onStore Command runs when a player puts an item into a slot.


  • To clear commands, use the clear keyword.


  • To remove one command, use the remove.N keyword, where N is the index of it in the list.


  • Use /goop containers config view to view the commands already bound to a container.

    • Also shows you their current index, for use with the remove.N keyword.


  • Consider using /goop mythicmobs runSkillAs as the command in a slot for complicated operations; Making a mythic skill is much more powerful, and easy to edit at the same time.

    • /goop mythicmobs runSkillAs MMSkill %player%

Simple Examples:

/goop containers config commands BANK onOpen goop tell %player% &aYou open your bank vault.

Makes a player get notified in chat when they open their BANK container 'You open your bank vault'.


/goop containers config commands STEEL_SMELTERY 22 goop mythicmobs runSkillAs SteelSmelt %player%

When a player clicks slot #22 in 'STEEL_SMELTERY', they will run a mythic skill that will carry out the smelting operations.


/goop containers config commands IRON_CHEST PHYSICAL 4 onStore remove.0

Removes the topmpost command bound to putting items inside slot #4 of 'IRON_CHEST'.