Skip to content

2: Commands

Emafire003 edited this page Jul 15, 2024 · 5 revisions

ColoredGlowLib Commands

You can explore the commands added by this mod yourself in game, or read the rest of this page, by typing in chat:

/cgl or /coloredglowlib

And press tab to look for the subcommands. This is done so you can have all of the commands added by this mod in a single place, which is more comfortable. The subcommands are used to set the glowing color of a target, to clear it, and to manage the other settings.

If you are using a permissions mod you can give acces to all of this commands using coloredglowlib.commands. Otherwise, player will need to be operators.

SetGlowColor subcommand

Permission required: coloredglowlib.commands.setglowcolor

With this command you can set an entity's color to an RGB value, express in hexadecimal value (aka a string of RRGGBB). You can use color pickers to chose the color you want, like this one for example. Anyway, this is the syntax of the command:

  • /cgl setglowcolor <target> <color> [visibleOnlyToPlayer]

The target parameter is the entity you want to target, so @p, Emafire003, the uuid of the entity in front of you etc. It is also availbale for Entity Types, aka the type entity you want to target, a bit like in the /summon command, so something like minecraft:cow, minecraft:armor_stand, minecraft:parrot etc. You can also use default as target, this will be used as the default color for entities and entity types that don't have a custom color already set. The optional parameter visibleOnlyToPlayer is the only player who will see the color applied to that specific entity. It currently only supports entity-specific colors, and is available from version 3.2.0 of the mod.

The color parameter is a hexadecimal string color code (like ff85ab, 750711, abc, 123, a7e etc.). You have to write it without the '#' since minecraft interprets it as a beginning of a tag or something (which is not what it should be doing in this case). In alternative you can provide the word rainbow that will make the entity glow, you guessed it, rainbow.

Starting from version 3.0.0 you can also use random which will make the entiy glow a random color every half a second. (a little less, every 7 ticks), as well as a custom color animation name, added via a datapack!

Examples:

Hex color string

/cgl setglowcolor minecraft:polar_bear 1fb19e

or

Condensed hex color string

/cgl setglowcolor Notch F31

polaro bearo

Custom color animation added by the example datapack

/cgl setglowcolor Emafire003 marine

Rainbow color

/cgl setglowcolor default rainbow

Rainbow color easter egg Entities named jeb_ will always glow rainbow, no matter what color you set to them. Only exeception is having overrideTeamColors active with the entity being in a team and having a vanilla color.

Settings subcommand

Permission required: coloredglowlib.commands.settings

There are a few settings to customize your experience, they all are "boolean" values, which means they are either active or inactive, true or false, and this settings are:

  • globalOverEverything -> Disabled by default, makes the default color override all other entity/entitytype-specific colors making it a global color.
  • typeOverEntity -> Disabled by default, makes the EntityType's colro override an entity-specific color if present.
  • overrideTeamColors -> Disabled by default, if enabled will give priority to the color setted by the mod instead of the color assigned by Minecraft vanilla to an entity which is part of a team.

All of these settings can be modified by executing:

/cgl settings set <setting> <true/false>

If you instead want to know the current value of the settings you can use:

/cgl settings get <setting>

Clear command

Permission required: coloredglowlib.commands.settings

This command allows you to clear color data from an entity/entitytype/default. The syntax is the following.

/cgl clear <target> [useDefault]

The target is either an Entity or an EntityType or "default", while the useDefault parameter is optional, and is used to set the clear color to be the custom default one, instead of the setting it back to white. This option is (clearly) not available if you are clearing the default color.

/cgl clear all confirm

This is used to clear every setting and color from the server, except for entity specifc color, for which you will need to use the command above with @e as target.

To use the clear all command you will also need the permission: coloredglowlib.commands.clearcolor.all