#(sikashmc) How to foreach every dropped item in a server

15 messages · Page 1 of 1 (latest)

neat saffron
#

🐧

steep marlinBOT
#

(sikashmc) How to foreach every dropped item in a server

steep marlinBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

opaque python
#

!t world.entities

cyan sundialBOT
opaque python
#

!t server.worlds

cyan sundialBOT
opaque python
#
- foreach <server.worlds> as:world:
  - foreach <[world].entities[dropped_item]>:
    - ...
#

if you want to clear dropped items,

#

!c remove

cyan sundialBOT
# opaque python !c remove
Group

entity

Syntax

remove [<entity>|...] (world:<world>)

Short Description

Despawns an entity or list of entities, permanently removing any NPCs.

Description

Removes the selected entity. May also take a list of entities to remove.

Any NPC removed this way is completely removed, as if by '/npc remove'.
For temporary NPC removal, see !command despawn.

If a generic entity name is given (like 'zombie'), this will remove all entities of that type from the given world.
Optionally, you may specify a world to target.
(Defaults to the world of the player running the command)

opaque python
#

you dont need to loop through the entities

#

just - remove <[world].entities[dropped_item]>

neat saffron
#

thx