Configuration
Configuration
[Last updated for General 4.2]
Config Files
General uses several config files.
- config.yml — Allows you to change miscellaneous settings settings.
- items.yml — Allows you to change various detail settings related to the /give command. You shouldn't need to edit this file unless you want to change the display names of items; if it is not found, a default will be generated when General first runs.
- mobs.yml – Allows you to change names and aliases for mobs.
- kits.yml – (optional) Allows you to configure kits.
- Optional: general.motd, *.help
YAML Configuration nodes
config.yml
- give.groups.*: Each node here is a list of item IDs, defining a group of items to be restricted from some users in the /give command.
- give.others-for-all: Defines the behaviour if someone requests an item not in a group. If true, they get the item. If false, they don't. (Default: true)
- give.mass: The maximum number of items that can be spawned with a single /give command. (Default: 64)
- playerlist.allow-all: Allow a player to view bits of info for themselves that are disabled with the other playerlist.* nodes. (Default: false)
- playerlist.show-health: Whether to show the health bar in the /who function. (Default: true)
- playerlist.show-coords: Whether to show the coordinates in the /who function. (Default: true)
- playerlist.show-world: Whether to show the world in the /who and /getpos functions. (Default: false)
- playerlist.show-ip: Allow people to view their IP address in the /who function, and also other people's IP address if they have permission. (Default: false)
- playerlist.show-invisible: Show invisible players in the player listing. This does not affect the /who command or any other commands other than /playerlist. (Default: false)
- show-motd: If true, General displays a message of the day from the file general.motd to any player that joins. If false, it does not. (Default: true)
- time.format-24-hour: If true, /time displays its output in 24-hour time. Otherwise it displays in 12-hour time. (Default: false)
- time.show-ticks: Whether to include the ticks in the time output. (Default: true)
- log-commands: If true, General will print to the log whenever someone uses a General command, including who used it. (Default: false)
- lightning-range: The maximum distance from a player that the /weather command will cause a lightning strike. (Default: 20)
- summon-range: The maximum range when using
/tele near dest
or/tele nearmob dest
. (Default: 30) - show-usage-on-fail: Set to false to disable usage messages when a command is incorrectly entered. (Default: true)
- auto-save: If true, config.yml and kits.yml will be saved when the server stops. (Default: false)
- away-sleep: If true, players who have marked themselves from away won't interfere with the bed sleep cycle. (Default: true)
- away-defaults: If true, using the /away command without a message when you are not away will set you away with a default message. If false, doing this will give an error message informing the player that they are not away. (Default: true)
- default-away-msg: The default away message used if the above is true. (Default: "Generic away reason")
- tag-fmt: The format a player must say another players name in for General to recognize that they are "tagging" the player. When a player who is marked as away is tagged, the person tagging them is informed that they are away. (Default: "name:")
- language: The language for messages; the file used to read messages from is "messages_xx.yml" where xx is the language. (Default: en)
- teleport.basics: A list of teleport destinations that are considered "basic" and thus covered by the general.teleport.basic permission node. (Default: [world, player, home, spawn])
- teleport.warm-up: The time (in ticks) between using the teleport command and actually teleporting. (Default: 0)
- ban-kick-msg: The kick message used when someone is kicked from the server as a result of the /ban command. (Default: "You have been banned from this server!")
- heal-hunger: Whether use of the /heal command should restore your hunger level as well. (Default: true)
- cooldown.time: Cooldown time for /time setting. (Default: 0)
- cooldown.storm: Cooldown time for /weather. (Default: 0)
- cooldown.thunder: Cooldown time for /weather thunder. (Default: 0)
- cooldown.lightning: Cooldown time for /weather zap. (Default: 0)
- economy.system: Which economy system to use. Currently only iConomy and BOSEconomy are supported; None is also valid here. (Default: None)
- economy.disable: Whether to use economy at all; if no economy is installed but this is set to false, it will default to AllPay's item-based economy. (Default: true)
- economy.item: The ID of the item to use for money in the economy. Specify -1 to make use of an installed economy system. (Default: -1)
- economy.commands: The cost of various commands; each one defaults to 0.
- economy.give.take: Whether to allow the use of the /take command (and the /masstake command) to sell items with the economy; either trash or sell. (Default: sell)
- economy.give.clear: Whether to allow the use of the /clear command to sell items with the economy; either trash or sell. (Default: sell)
- economy.give.sell: If one or both of the above is set to "sell", this is the percentage of the buying price a player will get when selling items. Setting it to 0 is not quite the same as setting the above to "trash" since the latter would also suppress the "you have sold this" message. (Default: 100)
- economy.give.kits: The behaviour for determining the cost of a kit. Set it to "individual" to use the cost specified in kits.yml, "cumulative" for the price to be equal to the sum of the prices of the contents, and "discount" for the latter with a discount. (Default: "individual")
- economy.give.discount: If the above is "discount", this is the percentage of the cumulative cost that makes the kit's cost.
- export-permissions: If true, General will dump all its permission nodes to a file on startup.
- export-permissions-children: If this and the above are both true, General will list for each permission in the dump which permissions it implies.
items.yml
- names.item*: Where * is the item ID. Each node is either a string (the name of the item) or a list of strings (names for the item with every data value from 0 up to however many there are).
- names.ench*: Where * is the enchantment ID. Each node is a string giving the name of the enchantment.
- names.xp: A string giving the name of experience points.
- names.potions.name*: Where * is a potion's damage value modulo 64. Each node is a string giving the name of that potion. These nodes are only checked for no-effect potions, so if you had a name1 (for example) it would be ignored. The name0 is for mundane potion, not water bottle. The parameter {potion} in these names will be replaced with the type of potion it is (normal or splash). These names are only considered if regular checking fails (ie names.item373.data* does not exist).
- names.potions.type*: Where * is a potion's damage value modulo 16. Each node is a string giving the name of that potion. These nodes are only used for potions that have an effect, so if you had a name0 (for example) it would be ignored. The parameter {potion} in these names will be replaced with the type of potion it is (normal or splash). These names are only considered if regular checking fails (ie names.item373.data* does not exist).
- names.potions.splash: This string is substituted for the {potion} parameter in the type* or name* key if the potion is a splash potion.
- names.potions.extend: This string is appended to the potion name if it has an extended duration.
- names.potions.tier*: Where * is the level of the potion effect (currently only 1 or 2). This string is appended to the potion name if it is of the specified level.
- names.potions.generic: This string is substituted for the {potion} parameter in the type* or name* key if the potion is not a splash potion.
- variants.item*.max - Specifies valid damage values for the item. Won't work for blocks.
- variants.item*.range - Specifies valid damage values for the item. Won't work for blocks.
- variants.item*.ranges - Specifies valid damage values for the item. Won't work for blocks.
- variants.item*.class - (advanced) Sets the class that General uses to validate the item data and so forth. You probably never want to touch this.
- special.xp: A list of names that are considered to represent XP in the /give command.
- special.tree.type*: Where * is a damage value (0-3; 3 will be ignored until 1.2 is released). These give names that are considered to represent different tree types when used as a data value.
- special.colour.type*: Where * is a damage value (0-15). These give names that are considered to represent colours when used as a data value. General knows that dye has reversed data values (eg 15 is white and so forth) and will adapt accordingly. These names are also used for sheep colours.
- special.step.type*: Where * is a damage value (0-5). These give names that are considered to represent the various types of half steps when used as a data value.
- special.spawn.type*: Where * is an entity ID. These give names that are considered to represent various entities when used as a data value.
- special.brick.type*: Where * is a damage value (0-2). These give names that are considered to represent the various types of stone brick when used as a data value.
- special.shroom.*: Where * is a cardinal direction or one of top, stem, interior. These give names that are considered to represent the texturing of a huge mushroom block when used as a data value.
- special.potion.zero: These names are considered to represent a water bottle when used as a data value.
- special.potion.mundane.type*: Where * is a damage value modulo 64. These give names that are considered to represent no-effect potions when used as a data value. As with potion names, damage values that would represent a potion with a name are ignored.
- special.potion.basic.type*: Where * is a damage value modulo 16. These give names that are considered to represent potions with an effect when used as a data value. As with potion names, damage values that would represent a potion with a name are ignored.
- special.potion.mod.time: Specifies suffixes that when appended to a potion name are considered to make the potion have an extended duration.
- special.potion.mod.strength: Specifies suffixes that when appended to a potion name are considered to make the potion be of level 2. Only applies to potions with an effect (the ones in the "basic" section).
- special.potion.mod.splash: Specifies suffixes that when appended to a potion name are considered to make the potion be a splash potion. These ones will also be considered as prefixes.
- special.enchant.type*: Where * is an enchantment ID. These specify names that will resolve to a given enchantment when specified in the /give command.
- hooks: A mapping of pseudo-item names. Each entry has a number of subentries, whose values must be a valid item string (ie of the form "<id>:<data>"). Make sure to put it in quotes. The idea is that you can type <entry>:<sub-entry> as an item name to get the specified item. See the sample items.yml file to get an idea of how it works.
kits.yml
Each kit is one block in the yml file, with the key being its name.
- <kit>.delay: The cooldown time for the kit.
- <kit>.cost: The cost of the kit.
- <kit>.items: The list of items in the kit. If you have more than one of the same item, you can list it as "item: amount" rather than just listing the same item several times. If you want enchanted items, the mapping of enchantments to levels replaces the amount. This is best shown by example.
Example:
starterkit: delay: 3 cost: 5.2 items: - apple: 3 - workbench - dpick: SILK_TOUCH: 1
mobs.yml
mobs.mob*: Where * is an entity ID. This specifies names that resolve to the given mob. Mob names are specified as a list of names, some of which may have an associated plural in the format "singular: plural". data.mob*: Where * is an entity ID. These specify values for the various possible data that mobs can have. Exactly what data is specified varies depending on the mob, but in general it's a mapping of keywords to lists of names. data.baby: A list of names indicating a baby mob. data.adult: A list of names indicating an adult mob.
The data keywords available in data.mob* are as follows:
- Pig
- saddle, free
- Sheep
- bald, natural, random
- Creeper
- powered, unpowered
- Pig Zombie
- calm, angry
- Slime / Magma Cube
- colossal, huge, large, medium, small, tiny
- Wolf
- wild, angry, tame
- Enderman
- empty
Note that some mobs (Endermen, Sheep, and Wolves) have additional valid data values that are obtained from other sources.
Help file(s)
If there is a file called "xxx.help", it will be shown to the user when they type "/help xxx". This goes for any xxx.
Message of the Day
The message of the day is read from the file general.motd, if it exists. Within the MOTD file, you can use variables, which will be substituted on the fly with player-specific information. Each has a short form (two characters, the first of which is a plus sign) and a long form (HTML-entity style, start with ampersand and close with semicolon). Using a plus-sign for the long form is supported for backwards compatibility. If you want a literal plus sign which would be confused with a variable, double the plus sign.
If a player has the permission "general.motd.<something>", they will be shown a MOTD from the file <something>.motd instead of the one from general.motd. If they have more than one such permission, the first one found is used.
MOTD Variables
{dname}
— Player's display name (abbreviation: d){name}
— Player's name (abbreviation: n){location}
— Player's XYZ coordinates (abbreviation: l){health}
— Player's current health (abbreviation: h){balance}
— Player's current iConomy balance (abbreviation: $){currency}
— The name of the iConomy currency unit. Note that this is automatically included in the balance, so only use it if you want to say something like "The unit of currency is +m." (abbreviation: m){ip}
— Player's IP address (abbreviation: a){online}
— Number of players online (abbreviation: c){world}
— The world the player is in (abbreviation: w){time}
— Current in-game time (abbreviation: t){list}
— A list of all online players (abbreviation: p){server}
— The name of your server (as specified in server.properties){level}
— Player's experience level
Colour codes
- The § character followed by a hexadecimal digit (0-9 or a-f) or the letter k.
- A colour name enclosed in {curly braces}. Valid colour names are black, navy, green, teal, red, purple, gold, silver, gray/grey, blue, lime, aqua, rose, pink, yellow, white, listed in increasing order of associated numerical colour code. There is also a "magic" colour.
- Colour codes will work both in the MOTD file and in the help files.
Comments