forked from ModDamage/ModDamage
-
Notifications
You must be signed in to change notification settings - Fork 0
Routine: Foreach Loop
1cec0ld edited this page Dec 13, 2012
·
3 revisions
Allows you to go through every entity and do something with/to them.
- 'for|each {filter} in ({world}|server) as {newname}':
- 'more routines using newname'{filter} - Any entity that can be used as the filter in the Nearby Routine.
{world}|server - The world name you want to affect. Use Server if you want all worlds affected.
{newname} - A custom label you want to give all entities selected by this. Much like 'it' in the Nearby Routine.
Nested under the routine, the {newname} entity reference refers to the selected entity, and the routines will be run on each entity in the world/server.
Command:
- 'party':
- 'foreach player in server as named':
- 'namedeffect.dropitem.diamond'