Skip to content

Advanced Configuration

LartTyler edited this page May 28, 2012 · 2 revisions

Though my goal in designing Solus was to create a powerful plugin that was easy to configure, I also threw in some more advanced features that, while not necessary or even generally noticable in day-to-day use of the plugin, can be used to enhance and simply the configuration.

Item Groups

The Item Group system allows you to define preset groups of items, such as the stock COMMON_ITEMS, that can be used in a class's permit nodes. They are defined in the ItemGroups.yml file, located in the same directory as the main config file.

Creating a new item group is simple. For example, lets say we wanted to create a group that included all pieces of an iron armor set. One way to define this would be:

groups:
    IRON_ARMOR:
        - IRON_HELMET
        - IRON_CHESTPLATE
        - IRON_LEGGINGS
        - IRON_BOOTS

However, the real power of the Item Group system is it's support of regexes. The same effect achieved above could be written:

groups:
    IRON_ARMOR:
        - iron_(helmet|chestplate|leggings|boots)

Both would have the same effect. The benefit might not be as apparent with this example, since both would take just about the same amount of time to type up. However, lets look at an example group used to control a miner class's permit node.

groups:
    PICKAXES:
        - PICKAXE$

That line alone would permit all pickaxes. The regex directive "$" denotes the end of the line, so "PICKAXE$" means the word "pickaxe" followed by the end of the line. I won't go into detail on how regex works, but you can take a look here to learn more.

<=== Back to Useful Commands    |    Advanced Configuration                               

Clone this wiki locally