Package com.sk89q.commandbook.util
Class InputUtil.LocationParser
java.lang.Object
com.sk89q.commandbook.util.InputUtil.LocationParser
- Enclosing class:
- InputUtil
public static class InputUtil.LocationParser
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description LocationParser() -
Method Summary
Modifier and Type Method Description static org.bukkit.LocationmatchLocation(org.bukkit.command.CommandSender source, java.lang.String filter)Match a target.static java.util.List<org.bukkit.Location>matchLocations(org.bukkit.command.CommandSender source, java.lang.String filter)Match multiple targets.static org.bukkit.WorldmatchWorld(org.bukkit.command.CommandSender sender, java.lang.String filter)Match a world.static doubleparseCoordinateValue(java.lang.String string)Parse a location coordinate.
-
Constructor Details
-
LocationParser
public LocationParser()
-
-
Method Details
-
parseCoordinateValue
public static double parseCoordinateValue(java.lang.String string)Parse a location coordinate.- Parameters:
string- the potentially decorated string- Returns:
- the coordinate number represented by this string
-
matchWorld
public static org.bukkit.World matchWorld(org.bukkit.command.CommandSender sender, java.lang.String filter) throws com.sk89q.minecraft.util.commands.CommandExceptionMatch a world.- Parameters:
sender-filter-- Returns:
- Throws:
com.sk89q.minecraft.util.commands.CommandException
-
matchLocation
public static org.bukkit.Location matchLocation(org.bukkit.command.CommandSender source, java.lang.String filter) throws com.sk89q.minecraft.util.commands.CommandExceptionMatch a target.- Parameters:
source-filter-- Returns:
- first result of matchLocations
- Throws:
com.sk89q.minecraft.util.commands.CommandException- no matches found
-
matchLocations
public static java.util.List<org.bukkit.Location> matchLocations(org.bukkit.command.CommandSender source, java.lang.String filter) throws com.sk89q.minecraft.util.commands.CommandExceptionMatch multiple targets.- Parameters:
source-filter-- Returns:
- list of locations
- Throws:
com.sk89q.minecraft.util.commands.CommandException- no matches found
-