config explanation

Config explanation

HomeBlock uses a config which allows you to set any name, texture and recipe of each block in the HomeBlock plugin. It also allows you to remove or add optional blocks/items to your HomeSystems or add completly new HomeSystems.

How does the config of HomeBlock work

In the config of HomeBlock everything is divided into HomeSystems, a HomeSystem is one type of a Home a player can have plus all blocks and items that interact with that home. So when you use the default config, normal is a HomeSystem which allows the players to have one home and + is a HomeSystem which allows the players to have another home. On your server you can have any number of HomeSystems.
Please look at the default config file to get an idea of how the config file really works.

HomeSystems

A HomeSystem can contain up to four sections, one is mandatory and the others are optional.

First we have the HomeBlock, this one is mandatory in every HomeSystem. This section describes the HomeBlock which is used to let a player set his home when placed.

Another one is the HomeTeleporter.This one is optional and can be removed (or added) to enable/disable it. A HomeTeleporter is used to let players teleport to their home, when their home is set.

Then we have a RandomHome; another optional section. The RandomHome allows a user to teleport to the home - belonging to the HomeSystem this section is in - of a random person.

And at last we have the HomeScroll. Those are scrolls that will teleport you to your home on consuming. Creating them will result scrolls which will be taken away on consuming them.

the Block/Item sections

Each section of a block or an item consists of the following: a name, a texture and a recipe. The name is the name that the block/item will get ingame, and must be unique (otherwise collisions in items will result). The texture is the url of a texture the block/item will get. Preferable a 16*16 png image.

Since v1.2 it also possible for all blocks and items (except for the HomeBlock) to have cooldown restrictions, when using the cooldown property a player have to wait before being able to use the block/item again. The time is described by a number followed by "s", "m", "h" or "d", those character are used to indicate seconds, minutes, hours and days respectively.

The recipe is the recipe of how to create the items on the workbench, a recipe is a subsection itself and should contain a shape and a set list. The shape is how the recipe will look in the workbench, with each character representing an item and a space representing an empty spot on the workbench. Rows of the recipe should be divided by a "," with no extra spaces behind or before them, since a space is a part of the recipe (an empty spot).
Next you will have a list named set. On each element in the list you can define what the characters in the shape mean. For example if the character "d" should be Dirt, then you should add to the set list: "-d=Dirt".
In addition you can add "amount" to let the recipe return more then one item at a time.
If you prefer you can also leave the recipe section out, when left out an item can not be created using the workbench, this allows items to be admin only.

Adding more HomeSystems

To add more HomeSystems you should create a new Section in the HomeSystems section named with an unique name of how your HomeSystem will be called. Now you can add Blocks to your HomeSystem using subsection named HomeBlock (mandatory), HomeTeleporter(mandatory), RandomHome(optional) and HomeScroll(optional). And fill those subsection as described in "the Block/Item section".
To really add your HomeSystem, you have to add the HomeSystem name to the enabled list.

Now you can reload the server to try to load your HomeSystem into your server. If everything goes correctly a message should be send to the server console showing "[HomeBlock] <HomeSystemName> HomeSystem loaded", otherwise a message will be shown telling you what went wrong in the config file.


Comments

Posts Quoted:
Reply
Clear All Quotes