Minecraft/Essentials/Kits

Материал из Unkov Wiki
Версия от 13:55, 2 мая 2024; Nikolay (обсуждение | вклад) (Новая страница: «Essentials supports a wide range of kit functionality. Kits can contain anything from stacks of simple items, to complicated 'unique' items, utilising advanced i...»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)

Essentials supports a wide range of kit functionality. Kits can contain anything from stacks of simple items, to complicated 'unique' items, utilising advanced item meta, enchantments and item lore.

Essentials also supports permission based kits, kit signs, new player kits, and kit cooldowns to prevent abuse.

Configuration

Config Settings

Essentials allows for spawning 'unsafe' enchantments in kits, but only if you edit the config.yml To allow 'unsafe' enchantments in kits and item spawning you will need to change the following setting:

 unsafe-enchantments: true

Warning: Mixing and overleveling some enchantments can cause issues with clients, servers and plugins.

Delay

You can set a delay or cooldown (in seconds) on kits to prevent abuse. A cooldown of '3600' would prevent the kit being used more than once an hour. If you want a 'One use kit' set the delay to -1.

Kit costs

In the command costs section of the config.yml you can define costs for each kit, for example:

kit-tools: 100

Would make it so /kit tools charges the player $100

Newbie kit

If you are using the Essentials Spawn plugin, along with setting the a special spawnpoint or welcome message, you can also give new players a kit.

This can be used to give a simple set of tools to get the player started, or could be used to give special items such as a book of server rules.

newbies:
  kit: tools

Config Syntax

The config syntax for kit's is fairly simple:

kits:
  <kit name>:
    delay: <delay between usage>
    items:
      - <item number> <amount> <meta>
      - <item number> <amount> <meta>

Шаблон:See

Example

kits:
  tools:
    delay: 10
    items:
      - 272 1
      - 273 1
      - 274 1
      - 275 1
  dtools:
    delay: 600
    items:
      - 277 1 digspeed:3 name:Dwarf lore:Diggy|Diggy|Hole
      - 278 1 efficiency:1 durability:1 fortune:1 name:&4Gigadrill lore:The_drill_that_&npierces|the_heavens
      - 279:780 1
      - $500
  tophat:
    delay: 600
    items:
      - 298 1 color:255,255,255 name:Top_Hat lore:Good_day,_Good_day
  color:
    delay: 6000
    items:
      - 387 1 title:&4Book_&9o_&6Colors author:KHobbits lore:Ingame_color_codes book:Colors

The 'dtools' kit would give the user items with the id '277', '278' and '279' which refer to 3 types of diamond tools. This command could be used every 600 seconds. Two of these items would be enchanted with special names and lore, while the other would be half used (data/damage value of 780). It also gives you $500 eco currency to use.

The 'color' kit would give the player a written book. This book would pull data from the 'colors' chapter of book.txt, which by default contains a list of color codes.

You can also use smart tags like {USERNAME} in kit meta data.

Kit Permissions

Kit permissions are set using the node essentials.kit. This allows the user access to the /kit command and in turn the ability to access custom kits.

Custom kits that have been setup in the config file (covered above) are automatically assigned a permission based on their name essentials.kits.<kitname>. This permission node can then be used to allow or disallow access to specific kits. Please note, the essentials.kit permission is required for the use of /kit but is not required for kit signs.

Item Meta

Kit's can make good use of item meta to allow users to spawn in unique items or items which would otherwise be difficult to make.

Kits take the same syntax as the /i and /give command, but can take a much longer set of arguments, meaning you can construct much more interesting items for your players. Making good use of item names and lore, along with other assorted item meta, can help produce a unique server experience.

Шаблон:See

Signs

Шаблон:See

Essentials signs can be used to allow players to spawn kits that they would not normally have access too. This can be controlled in two ways.

If you do not normally allow players access to /kit, you can assign players permissions for each kit you would like to allow players access, and make a simple [kit]/kitname sign.

If you normally allow players to spawn kits with /kit, you can utilize the 3rd line of the kit sign to white list a permission group, or simply give everyone access to the kit via this sign.

The 4th line is reserved for costs, and can be used to limit the sign to a set number of uses, or charge the user via items or account balance.


Взято с сайта http://wiki.ess3.net/wiki/Command_Reference/Kits