kill
Kills all the mobs you select.
mobs.kill(
mobs.target(ALL_ENTITIES)
);
Parameters
- target: a selector that chooses which mobs are killed.
Example
Kill all the creepers near the current player.
mobs.kill(
mobs.near(
mobs.entitiesByType(mobs.monster(MonsterMob.Creeper)),
player.position(),
10
)
)