public interface StringMatcher
| Modifier and Type | Method and Description |
|---|---|
default java.lang.Iterable<? extends LocalPlayer> |
checkPlayerMatch(java.util.List<? extends LocalPlayer> players)
Checks if the given list of players is greater than size 0, otherwise
throw an exception.
|
com.sk89q.worldedit.world.World |
getWorldByName(java.lang.String worldName)
Gets a world by name, if possible.
|
java.util.List<LocalPlayer> |
matchPlayerNames(java.lang.String filter)
Match player names.
|
com.sk89q.worldedit.extension.platform.Actor |
matchPlayerOrConsole(com.sk89q.worldedit.extension.platform.Actor sender,
java.lang.String filter)
Match only a single player or console.
|
java.lang.Iterable<? extends LocalPlayer> |
matchPlayers(com.sk89q.worldedit.extension.platform.Actor source,
java.lang.String filter)
Matches players based on the specified filter string
The filter string format is as follows:
* returns all the players currently online
If
sender is a Player:
#world returns all players in the world that sender is in
#near reaturns all players within 30 blocks of sender's location
Otherwise, the format is as specified in matchPlayerNames(String) |
default java.lang.Iterable<LocalPlayer> |
matchPlayers(LocalPlayer player)
Get a single player as an iterator for players.
|
default LocalPlayer |
matchSinglePlayer(com.sk89q.worldedit.extension.platform.Actor sender,
java.lang.String filter)
Match only a single player.
|
com.sk89q.worldedit.world.World |
matchWorld(com.sk89q.worldedit.extension.platform.Actor sender,
java.lang.String filter)
Match a world.
|
java.lang.String |
replaceMacros(com.sk89q.worldedit.extension.platform.Actor sender,
java.lang.String message)
Replace macros in the text.
|
com.sk89q.worldedit.world.World matchWorld(com.sk89q.worldedit.extension.platform.Actor sender,
java.lang.String filter)
throws com.sk89q.minecraft.util.commands.CommandException
name is located in, if the player is online.
[name] A world with the name namesender - The sender requesting a matchfilter - The filter stringcom.sk89q.minecraft.util.commands.CommandException - if no world matchesjava.util.List<LocalPlayer> matchPlayerNames(java.lang.String filter)
name
*[name] matches any player whose name contains name
[name] matches any player whose name starts with namefilter - The filter string to check.List of players who match filterdefault java.lang.Iterable<? extends LocalPlayer> checkPlayerMatch(java.util.List<? extends LocalPlayer> players) throws com.sk89q.minecraft.util.commands.CommandException
players - The List to checkplayers as an Iterablecom.sk89q.minecraft.util.commands.CommandException - If players is emptyjava.lang.Iterable<? extends LocalPlayer> matchPlayers(com.sk89q.worldedit.extension.platform.Actor source, java.lang.String filter) throws com.sk89q.minecraft.util.commands.CommandException
sender is a Player:
#world returns all players in the world that sender is in
#near reaturns all players within 30 blocks of sender's location
Otherwise, the format is as specified in matchPlayerNames(String)source - The CommandSender who is trying to find a playerfilter - The filter string for playerscom.sk89q.minecraft.util.commands.CommandException - if no matches are founddefault LocalPlayer matchSinglePlayer(com.sk89q.worldedit.extension.platform.Actor sender, java.lang.String filter) throws com.sk89q.minecraft.util.commands.CommandException
sender - The Actor who is requesting a player matchfilter - The filter string.com.sk89q.minecraft.util.commands.CommandException - If more than one player match was foundfor filter string syntaxcom.sk89q.worldedit.extension.platform.Actor matchPlayerOrConsole(com.sk89q.worldedit.extension.platform.Actor sender,
java.lang.String filter)
throws com.sk89q.minecraft.util.commands.CommandException
matchSinglePlayer(Actor, String)sender - The sender trying to match a CommandSenderfilter - The filter stringcom.sk89q.minecraft.util.commands.CommandException - if either zero or more than one player matched.default java.lang.Iterable<LocalPlayer> matchPlayers(LocalPlayer player)
player - The player to return in an Iterablecom.sk89q.worldedit.world.World getWorldByName(java.lang.String worldName)
worldName - The namejava.lang.String replaceMacros(com.sk89q.worldedit.extension.platform.Actor sender,
java.lang.String message)
sender.
%id%: The unique name of the sender.
%online%: The number of players currently online on the server
If sender is a Player:
%world%: The name of the world sender is located in
%health%: The health of sender.sender - The sender to checkmessage - The message to replace macros in