Command Reference/ICheat
From Essentials
You can control which items can be spawned by players in-game by either blacklisting items in the config file or by just giving access to spawn specific items that you want each user or group to be able to spawn.
Contents |
Config file settings
There are a number of settings which can be configured from the config file. These are used to control the basic functionality of these commands.
default-stack-size
This configures how many items will be given if a user doesn't stipulate the amount.
- 'default-stack-size' defaults to 64.
item-spawn-blacklist
This configures which items should be blacklisted from being spawned by people with access to /item and /give.
item-spawn-blacklist: 46,11,10
This would prevent items with the id '46', '11' and '10' which refer to the different types of lava.
- 'default-stack-size' defaults to .
permission-based-item-spawn
This option enables enables fine grain control over which items can spawned by people with access to /item and /give.
permission-based-item-spawn: true
This means you will need to define exactly which items can be spawned using the permissions detailed in the section below.
- 'permission-based-item-spawn' defaults to 'false'.
kits
This configuration section lets you configure predefined sets of items which can be spawned by players. This is useful to allow players access to items which don't exist naturally in your world, to provide players with some starting help, or provide more customised gameplay.
You can set a delay or cooldown (in seconds) on these commands to prevent abuse. A cooldown of '3600' would prevent the command being used more than once an hour.
You can also define command costs in the config file.
kits:
dtools:
delay: 10
items:
- 277 1 efficiency:1
- 278 1
- 279:780 1
tools:
delay: 10
items:
- 272 1
- 273 1
- 274 1
- 275 1
command-costs:
kit-tools: 1500
kit-dtools: 5000
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 10 seconds, and would cost '5000' in-game currency. One item would be enchanted, and one item would be half used (data/damage value of 780).
Command Permissions
Before you can configure command permissions you must first be using some sort of permissions system. Essentials comes bundled with GroupManager which allows permissions to be configured on a per user or per group basis.
Each of these permissions can be configured on a per user, or per group basis. This in combination with the blacklist would allow multiple tiers of access. For example people in the admin group with the exempt permission could spawn anything, people in the mod group would have to follow the blacklist and certain user groups such as 'RedStone' could be given access to spawn stacks of redstone dust, redstone torches, diodes etc.
Item/Give
There is a lot of control available when it comes to spawning items. There is the basic access to the commands, there is access to spawn blacklisted items, and also access to only spawn specific items if permission-based-item-spawn is true on the essentials config.
These permissions can be given to a user directly, or to the group a user belongs.
Access to Commands
To allow access to /item and /i a user needs the essentials.item permission
To allow access to /give a user needs the essentials.give permission
Blacklist Exception
To allow a user to spawn all items, including those on the blacklist, a user needs access to the essentials.itemspawn.exempt permission
Per-Item Permission
If permission-based-item-spawn is true, you can stipulate which items a user can spawn by using the following permissions:
- essentials.itemspawn.item-all
- essentials.itemspawn.item-<itemname>
- essentials.itemspawn.item-<itemid>
- essentials.give.item-all
- essentials.give.item-<itemname>
- essentials.give.item-<itemid>
Giving access to just subtypes is impossible. The following permissions would give access to spawn every colour of wool:
- essentials.give.item-wool
- essentials.give.item-35
Unlimited
There is a separate set of permissions for the /unlimited command.
Access to Command
To allow access to /unlimited a user needs the essentials.unlimited permission
Others
To allow someone to give another user an unlimited stack they need to have access to the essentials.unlimited.others permission
Per-Item Permission
You can stipulate which items a user can spawn by using the following permissions:
- essentials.unlimited.item-all
- essentials.unlimited.item-<itemname>
- essentials.unlimited.item-<itemid>
- essentials.unlimited.item-bucket
Kits
Access to command
To allow access to /kit a user needs the essentials.kit permission
Per item permission
You can stipulate which kits a user can use by using the following permissions:
- essentials.kit.<kitname>
- essentials.kit.*