Commands


CoFH Core includes various server commands that can be useful to moderators or testers. This page lists all of them.

Summary

All of CoFH Core's commands must be prefixed with '/cofh '.

Command Description Permission level
version Displays the installed version of CoFH Core. -1
help Displays information about CoFH Core's commands. -1
syntax Displays the syntax of CoFH Core's commands. -1
friend Allows management of a player's friends list. -1
hand Displays information about held items. 0
tps Displays the server TPS rate. 0
enchant Applies enchantments to held items. 2
killall Removes all loaded entities of a certain type from the server. 2
tpx Advanced teleport command that allows teleporting to other dimensions. 2
clearblocks Removes blocks of certain types in an area. 3
countblocks Displays the amounts of blocks of certain types in an area. 3
replaceblocks Replaces blocks of certain types with another block type in an area. 3
reloadworldgen Reloads all custom world generation files. 3
unloadchunk Force-unloads the chunk that the command user is looking at. 4

List of commands

This section describes every command in detail.

version

Displays the installed version of CoFH Core.

/cofh version

help

Displays information about a CoFH Core command.

/cofh help [command | page]
command
The name of the command to display information about. If unspecified, displays a clickable list of all available commands.
page
The page of commands to display, when displaying a list of all available commands.

syntax

Displays the syntax of a CoFH Core command.

/cofh syntax [command | page]
command
The name of the command to display the syntax of. If unspecified, displays a clickable list of all available commands.
page
The page of commands to display, when displaying a list of all available commands.

friend

Allows management of a player's friends list. Can be done by either opening the friends list GUI or by adding/removing friends directly.

/cofh friend {gui | add <player> | remove <player>}
player
The username of the player to add or remove from the friends list.

hand

Displays various kinds of information about a player's held item.

/cofh hand [player] [infoType] [infoType] ...
player
The username of the player to show information of their held item for. If unspecified, the information of the command user's held item is displayed.
infoType
The type(s) of information to display about the item. If unspecified, only the name of the item is displayed.

The following types of information are supported:

  • name / generic: the name of the item. Can be hovered on in chat to display the item's tooltip.
  • size / amount / count: the amount of items in the stack, if applicable.
  • metadata / damage / alt: the metadata or damage value of the item.
  • modifiers: the modifiers of the item (e.g. Attack Damage).
  • enchants / enchant / ench: the enchantments on the item.
  • action / use: the action and use duration of the item, for items like Bows, food, etc.
  • lore / flavortext: the display name and lore of the item, if set.
  • oredict / orenames / orename / ores / ore: the registered Ore Dictionary names of the item.
  • nbt / tag / stacktag / compoundtag: the NBT data of the item stack.
  • tostring / string / text: a textual representation of the item stack.

tps

Displays the server TPS (ticks per second) rate. The TPS rate is commonly used to measure how smoothly the server is running, or if the server is suffering from heavy load. The optimal rate is 20 ticks per second.

/cofh tps {o | a | <dimension>}
dimension
The ID of the dimension to display the TPS rate for.

If no arguments are supplied, the overall tick time and the tick time per dimension will be shown. Using o, only the overall tick time will be displayed. Using a, the amount of loaded worlds, chunks, entities and tile entities will be shown. Using a dimension ID, the amount of loaded chunks, entities and tile entities will be shown for that dimension.


enchant

Applies enchantments to held items.

/cofh enchant [player] <enchantmentID> [level]
player
The username of the player whose held item is to be enchanted. If unspecified, the command user will be the target.
enchantmentID
The ID of the enchantment to apply. A list of vanilla enchantment IDs can be found here. A list of all enchantment IDs including those added by mods can be dumped by Not Enough Items.
level
The level of the enchantment to apply.

killall

Removes all loaded entities of a certain type from the server, excluding players.

/cofh killall [partialName]
partialName
The name or part of the name of the entity type to remove from the server. If unspecified, all hostile mobs will be removed. Can be set to * to remove all loaded entities.

tpx

An advanced teleportation command that allows teleporting to other dimensions.

/cofh tpx [player] {{<playerTo> | <dimension>} | <x> <y> <z> [dimension]}
player
The username of the player to teleport. If unspecified, the command user will be teleported.
playerTo
The username of the player to teleport to.
dimension
The ID of the dimension to teleport to. If unspecified when using coordinates, the player will be teleported within the dimension they are in.
x, y, z
The coordinates to teleport to.

If a player is teleported to a dimension without using coordinates, they will be teleported to the dimension's spawn point.


clearblocks

Removes blocks of certain types in an area.

/cofh clearblocks {<player> <xRadius> <yRadius> <zRadius> | <xStart> <yStart> <zStart> <xEnd> <yEnd> <zEnd>} [block[#meta]] [block[#meta]] ...
player
The username of the player to use as an origin of the area to remove blocks from.
xRadius, yRadius, zRadius
The radius in blocks along the respective axes of the area to remove blocks from, when using a player as an origin.
xStart, yStart, zStart, xEnd, yEnd, zEnd
The coordinates of the area to remove blocks from, when not using an origin.
block
The internal name (ID) of a block to remove. For example, minecraft:stone translates to Stone, and ThermalFoundation:Ore translates to the ore block from Thermal Foundation. If the block is from Minecraft itself, the minecraft: prefix is not required.
meta
The metadata of a block. Most of the time, the metadata of a block is equal to the damage value of its item form.

It is also possible to match blocks to remove using more generic terms as block arguments:

  • *fluid matches any fluid blocks.
  • *tree matches any kind of wood or leaves.
  • *repl matches any block that can be replaced when placing blocks, like tall grass.
  • *stone matches any block that has the rock material.
  • *sand matches any block that has the sand material.
  • *dirt matches any block that has the ground, grass, clay, snow, craftedSnow, ice or packedIce material.
  • *plant matches any block that has the plants, vine or leaves material.
  • *fire matches any block that has the fire or lava material, and any block that is currently on fire.

countblocks

Displays the amounts of blocks of certain types in an area. Syntax is very similar to clearblocks.

/cofh countblocks {<player> <xRadius> <yRadius> <zRadius> | <xStart> <yStart> <zStart> <xEnd> <yEnd> <zEnd>} [block[#meta]] [block[#meta]] ...

All arguments are the same as the ones clearblocks has.


replaceblocks

Replaces blocks of certain types with another block type in an area. Very similar to clearblocks.

/cofh replaceblocks {<player> <xRadius> <yRadius> <zRadius> | <xStart> <yStart> <zStart> <xEnd> <yEnd> <zEnd>} <replaceBlock[#meta]> [block[#meta]] [block[#meta]] ...
replaceBlock
The internal name (ID) of the block to replace blocks with.

All other arguments are the same as the ones clearblocks has.


reloadworldgen

Reloads all custom world generation JSON files.

/cofh reloadworldgen

unloadchunk

Force-unloads the chunk that the command user is looking at.

/cofh unloadchunk

© Copyright 2017 Team CoFH. Powered by GitHub Pages, Jekyll, UIkit.
Last updated: 2017-05-14 12:14:52 +0000