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.Location matchLocation​(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.World matchWorld​(org.bukkit.command.CommandSender sender, java.lang.String filter)
    Match a world.
    static double parseCoordinateValue​(java.lang.String string)
    Parse a location coordinate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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.CommandException
      Match 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.CommandException
      Match 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.CommandException
      Match multiple targets.
      Parameters:
      source -
      filter -
      Returns:
      list of locations
      Throws:
      com.sk89q.minecraft.util.commands.CommandException - no matches found