As of right now, the only target selector that can target entities other than players is @e, but this target selector cannot be used in commands such as /damage @e[type=entity] because the selector @e can target multiple of the same entity, e.g. the command /kill @e[type=zombie] would kill all zombies in the world, but /damage command only works on a singular entity.
By adding a new target selector that only targets the nearest single entity, the /damage command should work on entities rather than just players, e.g. /damage @c[type=zombie] would damage the closest zombie to the player, ignoring all other zombies in the world.
Please sign in to leave a comment.
3 Comments