public class EntitySelector
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ARGUMENT_COORDINATE_X |
private static java.lang.String |
ARGUMENT_COORDINATE_Y |
private static java.lang.String |
ARGUMENT_COORDINATE_Z |
private static java.lang.String |
ARGUMENT_COUNT |
private static java.lang.String |
ARGUMENT_DELTA_X |
private static java.lang.String |
ARGUMENT_DELTA_Y |
private static java.lang.String |
ARGUMENT_DELTA_Z |
private static java.lang.String |
ARGUMENT_ENTITY_TAG |
private static java.lang.String |
ARGUMENT_ENTITY_TYPE |
private static java.lang.String |
ARGUMENT_LEVEL_MAX |
private static java.lang.String |
ARGUMENT_LEVEL_MIN |
private static java.lang.String |
ARGUMENT_MODE |
private static java.lang.String |
ARGUMENT_PLAYER_NAME |
private static java.lang.String |
ARGUMENT_RANGE_MAX |
private static java.lang.String |
ARGUMENT_RANGE_MIN |
private static java.lang.String |
ARGUMENT_ROTX_MAX |
private static java.lang.String |
ARGUMENT_ROTX_MIN |
private static java.lang.String |
ARGUMENT_ROTY_MAX |
private static java.lang.String |
ARGUMENT_ROTY_MIN |
private static java.lang.String |
ARGUMENT_TEAM_NAME |
private static com.google.common.base.Splitter |
COMMA_SPLITTER |
private static com.google.common.base.Splitter |
EQUAL_SPLITTER |
private static com.google.common.base.Predicate<java.lang.String> |
IS_VALID_ARGUMENT |
private static java.util.regex.Pattern |
TOKEN_PATTERN |
private static java.util.Set<java.lang.String> |
VALID_ARGUMENTS |
private static java.util.Set<java.lang.String> |
WORLD_BINDING_ARGS |
Constructor and Description |
---|
EntitySelector() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
addArgument(java.lang.String argument) |
private static <T extends Entity> |
filterResults(java.util.Map<java.lang.String,java.lang.String> params,
java.lang.Class<? extends T> entityClass,
java.util.List<com.google.common.base.Predicate<Entity>> inputList,
java.lang.String type,
World worldIn,
BlockPos position) |
private static AxisAlignedBB |
getAABB(BlockPos pos,
int x,
int y,
int z) |
private static java.lang.String |
getArgument(java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String key) |
private static java.util.Map<java.lang.String,java.lang.String> |
getArgumentMap(java.lang.String argumentString) |
private static BlockPos |
getBlockPosFromArguments(java.util.Map<java.lang.String,java.lang.String> params,
BlockPos pos) |
private static double |
getCoordinate(java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String key,
double defaultD,
boolean offset) |
private static <T extends Entity> |
getEntitiesFromPredicates(java.util.List<T> matchingEntities,
java.util.Map<java.lang.String,java.lang.String> params,
ICommandSender sender,
java.lang.Class<? extends T> targetClass,
java.lang.String type,
Vec3d pos) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getGamemodePredicates(java.util.Map<java.lang.String,java.lang.String> params) |
private static int |
getInt(java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String key,
int defaultI) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getNamePredicates(java.util.Map<java.lang.String,java.lang.String> params) |
static java.util.List<EntityPlayerMP> |
getPlayers(ICommandSender sender,
java.lang.String token) |
private static Vec3d |
getPosFromArguments(java.util.Map<java.lang.String,java.lang.String> params,
Vec3d pos) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getRadiusPredicates(java.util.Map<java.lang.String,java.lang.String> params,
Vec3d pos) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getRotationsPredicates(java.util.Map<java.lang.String,java.lang.String> params) |
static java.util.Map<java.lang.String,java.lang.Integer> |
getScoreMap(java.util.Map<java.lang.String,java.lang.String> params) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getScorePredicates(ICommandSender sender,
java.util.Map<java.lang.String,java.lang.String> params) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getTagPredicates(java.util.Map<java.lang.String,java.lang.String> params) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getTeamPredicates(java.util.Map<java.lang.String,java.lang.String> params) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getTypePredicates(java.util.Map<java.lang.String,java.lang.String> params,
java.lang.String type) |
private static java.util.List<World> |
getWorlds(ICommandSender sender,
java.util.Map<java.lang.String,java.lang.String> argumentMap) |
private static java.util.List<com.google.common.base.Predicate<Entity>> |
getXpLevelPredicates(java.util.Map<java.lang.String,java.lang.String> params) |
private static boolean |
hasArgument(java.util.Map<java.lang.String,java.lang.String> params) |
private static <T extends Entity> |
isEntityTypeValid(ICommandSender commandSender,
java.util.Map<java.lang.String,java.lang.String> params) |
static boolean |
isSelector(java.lang.String selectorStr) |
static boolean |
isSelectorDefault(java.lang.String selectorStr) |
static <T extends Entity> |
matchEntities(ICommandSender sender,
java.lang.String token,
java.lang.Class<? extends T> targetClass) |
static <T extends Entity> |
matchEntitiesDefault(ICommandSender sender,
java.lang.String token,
java.lang.Class<? extends T> targetClass) |
static ITextComponent |
matchEntitiesToTextComponent(ICommandSender sender,
java.lang.String token) |
static boolean |
matchesMultiplePlayers(java.lang.String selectorStr) |
static boolean |
matchesMultiplePlayersDefault(java.lang.String selectorStr) |
static <T extends Entity> |
matchOneEntity(ICommandSender sender,
java.lang.String token,
java.lang.Class<? extends T> targetClass) |
static EntityPlayerMP |
matchOnePlayer(ICommandSender sender,
java.lang.String token) |
private static final java.util.regex.Pattern TOKEN_PATTERN
private static final com.google.common.base.Splitter COMMA_SPLITTER
private static final com.google.common.base.Splitter EQUAL_SPLITTER
private static final java.util.Set<java.lang.String> VALID_ARGUMENTS
private static final java.lang.String ARGUMENT_RANGE_MAX
private static final java.lang.String ARGUMENT_RANGE_MIN
private static final java.lang.String ARGUMENT_LEVEL_MAX
private static final java.lang.String ARGUMENT_LEVEL_MIN
private static final java.lang.String ARGUMENT_COORDINATE_X
private static final java.lang.String ARGUMENT_COORDINATE_Y
private static final java.lang.String ARGUMENT_COORDINATE_Z
private static final java.lang.String ARGUMENT_DELTA_X
private static final java.lang.String ARGUMENT_DELTA_Y
private static final java.lang.String ARGUMENT_DELTA_Z
private static final java.lang.String ARGUMENT_ROTX_MAX
private static final java.lang.String ARGUMENT_ROTX_MIN
private static final java.lang.String ARGUMENT_ROTY_MAX
private static final java.lang.String ARGUMENT_ROTY_MIN
private static final java.lang.String ARGUMENT_COUNT
private static final java.lang.String ARGUMENT_MODE
private static final java.lang.String ARGUMENT_TEAM_NAME
private static final java.lang.String ARGUMENT_PLAYER_NAME
private static final java.lang.String ARGUMENT_ENTITY_TYPE
private static final java.lang.String ARGUMENT_ENTITY_TAG
private static final com.google.common.base.Predicate<java.lang.String> IS_VALID_ARGUMENT
private static final java.util.Set<java.lang.String> WORLD_BINDING_ARGS
public static java.lang.String addArgument(java.lang.String argument)
@Nullable public static EntityPlayerMP matchOnePlayer(ICommandSender sender, java.lang.String token) throws CommandException
CommandException
public static java.util.List<EntityPlayerMP> getPlayers(ICommandSender sender, java.lang.String token) throws CommandException
CommandException
@Nullable public static <T extends Entity> T matchOneEntity(ICommandSender sender, java.lang.String token, java.lang.Class<? extends T> targetClass) throws CommandException
CommandException
@Nullable public static ITextComponent matchEntitiesToTextComponent(ICommandSender sender, java.lang.String token) throws CommandException
CommandException
public static <T extends Entity> java.util.List<T> matchEntities(ICommandSender sender, java.lang.String token, java.lang.Class<? extends T> targetClass) throws CommandException
CommandException
public static <T extends Entity> java.util.List<T> matchEntitiesDefault(ICommandSender sender, java.lang.String token, java.lang.Class<? extends T> targetClass) throws CommandException
CommandException
private static java.util.List<World> getWorlds(ICommandSender sender, java.util.Map<java.lang.String,java.lang.String> argumentMap)
private static <T extends Entity> boolean isEntityTypeValid(ICommandSender commandSender, java.util.Map<java.lang.String,java.lang.String> params)
private static java.util.List<com.google.common.base.Predicate<Entity>> getTypePredicates(java.util.Map<java.lang.String,java.lang.String> params, java.lang.String type)
private static java.util.List<com.google.common.base.Predicate<Entity>> getXpLevelPredicates(java.util.Map<java.lang.String,java.lang.String> params)
private static java.util.List<com.google.common.base.Predicate<Entity>> getGamemodePredicates(java.util.Map<java.lang.String,java.lang.String> params)
private static java.util.List<com.google.common.base.Predicate<Entity>> getTeamPredicates(java.util.Map<java.lang.String,java.lang.String> params)
private static java.util.List<com.google.common.base.Predicate<Entity>> getScorePredicates(ICommandSender sender, java.util.Map<java.lang.String,java.lang.String> params)
private static java.util.List<com.google.common.base.Predicate<Entity>> getNamePredicates(java.util.Map<java.lang.String,java.lang.String> params)
private static java.util.List<com.google.common.base.Predicate<Entity>> getTagPredicates(java.util.Map<java.lang.String,java.lang.String> params)
private static java.util.List<com.google.common.base.Predicate<Entity>> getRadiusPredicates(java.util.Map<java.lang.String,java.lang.String> params, Vec3d pos)
private static java.util.List<com.google.common.base.Predicate<Entity>> getRotationsPredicates(java.util.Map<java.lang.String,java.lang.String> params)
private static <T extends Entity> java.util.List<T> filterResults(java.util.Map<java.lang.String,java.lang.String> params, java.lang.Class<? extends T> entityClass, java.util.List<com.google.common.base.Predicate<Entity>> inputList, java.lang.String type, World worldIn, BlockPos position)
private static <T extends Entity> java.util.List<T> getEntitiesFromPredicates(java.util.List<T> matchingEntities, java.util.Map<java.lang.String,java.lang.String> params, ICommandSender sender, java.lang.Class<? extends T> targetClass, java.lang.String type, Vec3d pos)
private static AxisAlignedBB getAABB(BlockPos pos, int x, int y, int z)
private static BlockPos getBlockPosFromArguments(java.util.Map<java.lang.String,java.lang.String> params, BlockPos pos)
private static Vec3d getPosFromArguments(java.util.Map<java.lang.String,java.lang.String> params, Vec3d pos)
private static double getCoordinate(java.util.Map<java.lang.String,java.lang.String> params, java.lang.String key, double defaultD, boolean offset)
private static boolean hasArgument(java.util.Map<java.lang.String,java.lang.String> params)
private static int getInt(java.util.Map<java.lang.String,java.lang.String> params, java.lang.String key, int defaultI)
@Nullable private static java.lang.String getArgument(java.util.Map<java.lang.String,java.lang.String> params, java.lang.String key)
public static java.util.Map<java.lang.String,java.lang.Integer> getScoreMap(java.util.Map<java.lang.String,java.lang.String> params)
public static boolean matchesMultiplePlayers(java.lang.String selectorStr) throws CommandException
CommandException
public static boolean matchesMultiplePlayersDefault(java.lang.String selectorStr) throws CommandException
CommandException
public static boolean isSelector(java.lang.String selectorStr)
public static boolean isSelectorDefault(java.lang.String selectorStr)
private static java.util.Map<java.lang.String,java.lang.String> getArgumentMap(@Nullable java.lang.String argumentString) throws CommandException
CommandException