controls
controls([layout][:type])
Type: Iterator
Category: N/A
Permission: N/A
Since Minecraft Version: v1.10.2
Since Version: v0.13.2
Minor: 13
API: 23
Patch: 2
Description
Iterates over existing controls.
Can be filtered either by the layout or by the type of the control.
Example
// Iterate over all controls everywhere
FOREACH(controls)
// Iterate over all controls in the layout "ingame"
FOREACH(controls(ingame))
// Iterate over all button controls
FOREACH(controls(:button))
// Iterate over all button controls in "ingame"
FOREACH(controls(ingame:button))
// Example usage, set all labels to blue
FOREACH(controls(default:label));
SETPROPERTY(%CONTROLNAME%,"colour","blue");
NEXT;
Related Resources
Changelog
- Added em v0.13.2: