Package com.sk89q.worldguard
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
-
Method Summary
Modifier and TypeMethodDescriptionvoidBan this player.default AssociationgetAssociation(List<ProtectedRegion> regions)Get the highest association level for the input regions.floatGets the exhaustion of this player.intGets the number of ticks the player is on fire for.doubleGets the food level of this player.doubleGets the health of this player.doubleGets the max health of this player.longGets the time offset of the player.com.sk89q.worldedit.world.weather.WeatherTypeGets the players weatherdoubleGets the saturation of this player.booleanReturns true if this player is inside a group.booleanGets if the players time is relative.voidKick this player.voidClears fall distance.voidResets the players time to normal.voidResets the players weather to normal.voidThis should preferably take Components but there's no way to do that yetvoidsetCompassTarget(com.sk89q.worldedit.util.Location location)Sets the target of the compassvoidsetExhaustion(float exhaustion)Sets the exhaustion of this player.voidsetFireTicks(int fireTicks)Sets the number of ticks the player is on fire for.voidsetFoodLevel(double foodLevel)Sets the food level of this player.voidsetHealth(double health)Sets the health of this player.voidsetPlayerTime(long time, boolean relative)Sets the players time.voidsetPlayerWeather(com.sk89q.worldedit.world.weather.WeatherType weather)Sets the players WeatherTypevoidsetSaturation(double saturation)Sets the saturation of this player.voidTeleport 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, sendAnnouncementsMethods inherited from interface com.sk89q.worldedit.entity.Entity
getState, removeMethods inherited from interface com.sk89q.worldedit.util.Faceted
getFacetMethods inherited from interface com.sk89q.worldedit.util.Identifiable
getUniqueIdMethods inherited from interface com.sk89q.worldedit.extension.platform.Locatable
getBlockLocation, getExtent, getLocation, setLocation, setPosition, trySetPositionMethods 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, trySetPositionMethods inherited from interface com.sk89q.worldedit.session.SessionOwner
getSessionKeyMethods inherited from interface com.sk89q.worldedit.util.auth.Subject
checkPermission, getGroups, hasPermission
-
Method Details
-
hasGroup
Returns true if this player is inside a group.- Parameters:
group- The group to check- Returns:
- Whether this player is in
group
-
kick
Kick this player.- Parameters:
msg- The message to kick the player with
-
ban
Ban this player.- Parameters:
msg- The message to ban the player with
-
getAssociation
Description copied from interface:RegionAssociableGet the highest association level for the input regions.- Specified by:
getAssociationin interfaceRegionAssociable- 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 timerelative- 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
This should preferably take Components but there's no way to do that yet- Parameters:
title- the title to displaysubtitle- 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 tosuccessMessage- message to display on successfailMessage- message to display on failure
-