Selector

SporeCore supports advanced selectors, similar to the ones used in vanilla Minecraft. You can use the following selectors in commands:

  • @a → All players

  • @e → All entities

  • @r → A random player

  • @p → Nearest player

  • @s → The executor of the command (self)

🔹 Selector Options

The @e selector (and others that support options) allows you to filter targets using options in brackets: @e[option=input]

Option
Example value
Description

distance

5 5...10

The minimum distance for the action

gamemode

creative survival

What gamemode the target should be in

haspermission

* sporecore.gamemode.creative

What permission the target needs to have. It only shows a few permissions but all permissions work!

limit

1 2

The limit for entities/players

name

bob jerry

The name of the entity that has to match

sort

south forward

In what direction should the action be run for

tag

invis special

What minecraft tag the target entities should have

type

player pig zombie

what entity type should the target be

world

world world_the_end

In what world the entities should be in.

You can also combine multiple options by separating them with commas:

In this example:

  • type=player → Only selects players

  • limit=2 → Limits the selection to 2 targets

Last updated