Interface LocalPlayer

All Superinterfaces:
com.sk89q.worldedit.extension.platform.Actor, com.sk89q.worldedit.entity.Entity, com.sk89q.worldedit.util.Faceted, com.sk89q.worldedit.util.Identifiable, com.sk89q.worldedit.extension.platform.Locatable, com.sk89q.worldedit.entity.Player, RegionAssociable, com.sk89q.worldedit.session.SessionOwner, com.sk89q.worldedit.util.auth.Subject

public interface LocalPlayer extends com.sk89q.worldedit.entity.Player, RegionAssociable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    ban(String msg)
    Ban this player.
    default Association
    Get the highest association level for the input regions.
    float
    Gets the exhaustion of this player.
    int
    Gets the number of ticks the player is on fire for.
    double
    Gets the food level of this player.
    double
    Gets the health of this player.
    double
    Gets the max health of this player.
    long
    Gets the time offset of the player.
    com.sk89q.worldedit.world.weather.WeatherType
    Gets the players weather
    double
    Gets the saturation of this player.
    boolean
    Returns true if this player is inside a group.
    boolean
    Gets if the players time is relative.
    void
    kick(String msg)
    Kick this player.
    void
    Clears fall distance.
    void
    Resets the players time to normal.
    void
    Resets the players weather to normal.
    void
    sendTitle(String title, String subtitle)
    This should preferably take Components but there's no way to do that yet
    void
    setCompassTarget(com.sk89q.worldedit.util.Location location)
    Sets the target of the compass
    void
    setExhaustion(float exhaustion)
    Sets the exhaustion of this player.
    void
    setFireTicks(int fireTicks)
    Sets the number of ticks the player is on fire for.
    void
    setFoodLevel(double foodLevel)
    Sets the food level of this player.
    void
    setHealth(double health)
    Sets the health of this player.
    void
    setPlayerTime(long time, boolean relative)
    Sets the players time.
    void
    setPlayerWeather(com.sk89q.worldedit.world.weather.WeatherType weather)
    Sets the players WeatherType
    void
    setSaturation(double saturation)
    Sets the saturation of this player.
    void
    teleport(com.sk89q.worldedit.util.Location location, String successMessage, String failMessage)
    Teleport the player, potentially async, displaying the message on a success.

    Methods inherited from interface com.sk89q.worldedit.extension.platform.Actor

    canDestroyBedrock, dispatchCUIEvent, getDisplayName, getLocale, getName, isPlayer, openFileOpenDialog, openFileSaveDialog, print, print, printDebug, printDebug, printError, printError, printInfo, printRaw, sendAnnouncements

    Methods inherited from interface com.sk89q.worldedit.entity.Entity

    getState, remove

    Methods inherited from interface com.sk89q.worldedit.util.Faceted

    getFacet

    Methods inherited from interface com.sk89q.worldedit.util.Identifiable

    getUniqueId

    Methods inherited from interface com.sk89q.worldedit.extension.platform.Locatable

    getBlockLocation, getExtent, getLocation, setLocation, setPosition, trySetPosition

    Methods inherited from interface com.sk89q.worldedit.entity.Player

    ascendLevel, ascendToCeiling, ascendToCeiling, ascendUpwards, ascendUpwards, descendLevel, findFreePosition, findFreePosition, floatAt, getBlockIn, getBlockInHand, getBlockOn, getBlockTrace, getBlockTrace, getBlockTrace, getBlockTraceFace, getBlockTraceFace, getCardinalDirection, getCardinalDirection, getGameMode, getInventoryBlockBag, getItemInHand, getSolidBlockTrace, getWorld, giveItem, isHoldingPickAxe, passThroughForwardWall, sendFakeBlock, setGameMode, setOnGround, setPosition, trySetPosition

    Methods inherited from interface com.sk89q.worldedit.session.SessionOwner

    getSessionKey

    Methods inherited from interface com.sk89q.worldedit.util.auth.Subject

    checkPermission, getGroups, hasPermission
  • Method Details

    • hasGroup

      boolean hasGroup(String group)
      Returns true if this player is inside a group.
      Parameters:
      group - The group to check
      Returns:
      Whether this player is in group
    • kick

      void kick(String msg)
      Kick this player.
      Parameters:
      msg - The message to kick the player with
    • ban

      void ban(String msg)
      Ban this player.
      Parameters:
      msg - The message to ban the player with
    • getAssociation

      default Association getAssociation(List<ProtectedRegion> regions)
      Description copied from interface: RegionAssociable
      Get the highest association level for the input regions.
      Specified by:
      getAssociation in interface RegionAssociable
      Parameters:
      regions - a list of regions
      Returns:
      the highest membership level
    • getHealth

      double getHealth()
      Gets the health of this player.
      Returns:
      The health
    • setHealth

      void setHealth(double health)
      Sets the health of this player.
      Parameters:
      health - The health
    • getMaxHealth

      double getMaxHealth()
      Gets the max health of this player.
      Returns:
      The max health
    • getFoodLevel

      double getFoodLevel()
      Gets the food level of this player.
      Returns:
      The food level
    • setFoodLevel

      void setFoodLevel(double foodLevel)
      Sets the food level of this player.
      Parameters:
      foodLevel - The food level
    • getSaturation

      double getSaturation()
      Gets the saturation of this player.
      Returns:
      The saturation
    • setSaturation

      void setSaturation(double saturation)
      Sets the saturation of this player.
      Parameters:
      saturation - The saturation
    • getExhaustion

      float getExhaustion()
      Gets the exhaustion of this player.
      Returns:
      The exhaustion
    • setExhaustion

      void setExhaustion(float exhaustion)
      Sets the exhaustion of this player.
      Parameters:
      exhaustion - The exhaustion
    • getPlayerWeather

      com.sk89q.worldedit.world.weather.WeatherType getPlayerWeather()
      Gets the players weather
      Returns:
      The players weather
    • setPlayerWeather

      void setPlayerWeather(com.sk89q.worldedit.world.weather.WeatherType weather)
      Sets the players WeatherType
      Parameters:
      weather - The weather type
    • resetPlayerWeather

      void resetPlayerWeather()
      Resets the players weather to normal.
    • isPlayerTimeRelative

      boolean isPlayerTimeRelative()
      Gets if the players time is relative.
      Returns:
      If the time is relative
    • getPlayerTimeOffset

      long getPlayerTimeOffset()
      Gets the time offset of the player.
      Returns:
      The players time offset
    • setPlayerTime

      void setPlayerTime(long time, boolean relative)
      Sets the players time.
      Parameters:
      time - The players time
      relative - If it's relative
    • resetPlayerTime

      void resetPlayerTime()
      Resets the players time to normal.
    • getFireTicks

      int getFireTicks()
      Gets the number of ticks the player is on fire for.
      Returns:
      The number of fire ticks
    • setFireTicks

      void setFireTicks(int fireTicks)
      Sets the number of ticks the player is on fire for.
      Parameters:
      fireTicks - The fire ticks
    • setCompassTarget

      void setCompassTarget(com.sk89q.worldedit.util.Location location)
      Sets the target of the compass
      Parameters:
      location - The location
    • sendTitle

      @Beta void sendTitle(String title, String subtitle)
      This should preferably take Components but there's no way to do that yet
      Parameters:
      title - the title to display
      subtitle - the subtitle to display
    • resetFallDistance

      void resetFallDistance()
      Clears fall distance.
    • teleport

      void teleport(com.sk89q.worldedit.util.Location location, String successMessage, String failMessage)
      Teleport the player, potentially async, displaying the message on a success.
      Parameters:
      location - location to teleport to
      successMessage - message to display on success
      failMessage - message to display on failure