Package com.plotsquared.core.player
Class ConsolePlayer
- All Implemented Interfaces:
CommandCaller
,LocaleHolder
,PermissionHolder
,OfflinePlotPlayer
-
Nested Class Summary
Nested classes/interfaces inherited from class com.plotsquared.core.player.PlotPlayer
PlotPlayer.PlotPlayerConverter<BaseObject>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canSee
(PlotPlayer<?> other) Check if the player is able to see the other player.boolean
canTeleport
(@NonNull Location location) boolean
getAttribute
(String key) Retrieves the attribute of this player.Get theAudience
that represents this plot playerstatic ConsolePlayer
boolean
Determines whether or not the player can fly.Get this player's gamemode.long
Gets the time in milliseconds when the player was last seen online.Get this player's last recorded location or null if they don't any plot relevant location.Get this player's full location (including yaw/pitch)getName()
Gets the name of this player.Get the type of the callergetUUID()
Get this player's UUID.boolean
hasPermission
(@NonNull String permission) Check the player's permissions.boolean
isBanned()
Check if this player is banned.void
Kick this player from the game.void
Play music at a location for this player.void
removeAttribute
(String key) Remove an attribute from a player.void
removeEffect
(@NonNull String name) Removes any effects present of the given type.void
sendMessage
(@NonNull Caption caption, @NonNull net.kyori.adventure.text.minimessage.Template... replacements) Send a message to the command callervoid
sendTitle
(@NonNull Caption title, @NonNull Caption subtitle, int fadeIn, int stay, int fadeOut, @NonNull net.kyori.adventure.text.minimessage.Template... replacements) Send a title to the playervoid
setAttribute
(String key) Set player data that will persist restarts.void
setCompassTarget
(Location location) Set this compass target.void
setFlight
(boolean fly) Sets whether or not this player can fly.void
setGameMode
(@NonNull GameMode gameMode) Set this player's gameMode.void
setTime
(long time) Set this player's local time (ticks).void
setWeather
(@NonNull PlotWeather weather) Sets the local weather for this Player.void
void
teleport
(Location location, TeleportCause cause) Teleport this player to a location.toActor()
Methods inherited from class com.plotsquared.core.player.PlotPlayer
accessPersistentMetaData, accessTemporaryMetaData, equals, from, getAllowedPlots, getApplicablePlotArea, getClusterCount, getClusterCount, getCurrentPlot, getDebugModePlayers, getDebugModePlayersInPlot, getLocale, getLockRepository, getMeta, getPlayerClusterCount, getPlayerClusterCount, getPlotAreaAbs, getPlotCount, getPlotCount, getPlots, getPlots, hasDebugMode, hashCode, hasKeyedPermission, hasPermission, hasPermission, plotkick, populatePersistentMetaMap, refreshDebug, registerConverter, sendActionBar, sendTitle, setLocale, setupPermissionProfile, teleport, toString, unregister
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.plotsquared.core.permissions.PermissionHolder
hasKeyedPermission, hasPermission, hasPermission, hasPermissionRange, hasPermissionRange
-
Method Details
-
getConsole
-
toActor
- Specified by:
toActor
in classPlotPlayer<Actor>
-
getPlatformPlayer
- Specified by:
getPlatformPlayer
in classPlotPlayer<Actor>
-
canTeleport
- Overrides:
canTeleport
in classPlotPlayer<Actor>
-
getLocation
Description copied from class:PlotPlayer
Get this player's last recorded location or null if they don't any plot relevant location.- Overrides:
getLocation
in classPlotPlayer<Actor>
- Returns:
- The location
-
getLocationFull
Description copied from class:PlotPlayer
Get this player's full location (including yaw/pitch)- Specified by:
getLocationFull
in classPlotPlayer<Actor>
- Returns:
- location
-
getUUID
Description copied from class:PlotPlayer
Get this player's UUID. === !IMPORTANT ===
The UUID is dependent on the mode chosen in the settings.yml and may not be the same as Bukkit has (especially if using an old version of Bukkit that does not support UUIDs)- Specified by:
getUUID
in interfaceOfflinePlotPlayer
- Specified by:
getUUID
in classPlotPlayer<Actor>
- Returns:
- UUID
-
getLastPlayed
Description copied from interface:OfflinePlotPlayer
Gets the time in milliseconds when the player was last seen online.- Returns:
- the time in milliseconds when last online
-
hasPermission
Description copied from interface:CommandCaller
Check the player's permissions. Will be cached if permission caching is enabled.- Specified by:
hasPermission
in interfaceCommandCaller
- Specified by:
hasPermission
in interfacePermissionHolder
- Overrides:
hasPermission
in classPlotPlayer<Actor>
- Parameters:
permission
- the name of the permission- Returns:
- if permission is had
-
teleport
Description copied from class:PlotPlayer
Teleport this player to a location.- Specified by:
teleport
in classPlotPlayer<Actor>
- Parameters:
location
- the target locationcause
- the cause of the teleport
-
getName
Description copied from interface:OfflinePlotPlayer
Gets the name of this player.- Returns:
- the player name
-
setCompassTarget
Description copied from class:PlotPlayer
Set this compass target.- Specified by:
setCompassTarget
in classPlotPlayer<Actor>
- Parameters:
location
- the target location
-
setAttribute
Description copied from class:PlotPlayer
Set player data that will persist restarts. - Please note that this is not intended to store large values - For session only data use meta- Overrides:
setAttribute
in classPlotPlayer<Actor>
- Parameters:
key
- metadata key
-
getAttribute
Description copied from class:PlotPlayer
Retrieves the attribute of this player.- Overrides:
getAttribute
in classPlotPlayer<Actor>
- Parameters:
key
- metadata key- Returns:
- the attribute will be either
true
orfalse
-
removeAttribute
Description copied from class:PlotPlayer
Remove an attribute from a player.- Overrides:
removeAttribute
in classPlotPlayer<Actor>
- Parameters:
key
- metadata key
-
getSuperCaller
Description copied from interface:CommandCaller
Get the type of the caller- Specified by:
getSuperCaller
in interfaceCommandCaller
- Overrides:
getSuperCaller
in classPlotPlayer<Actor>
- Returns:
- Caller type
-
setWeather
Description copied from class:PlotPlayer
Sets the local weather for this Player.- Specified by:
setWeather
in classPlotPlayer<Actor>
- Parameters:
weather
- the weather visible to the player
-
getGameMode
Description copied from class:PlotPlayer
Get this player's gamemode.- Specified by:
getGameMode
in classPlotPlayer<Actor>
- Returns:
- the gamemode of the player.
-
setGameMode
Description copied from class:PlotPlayer
Set this player's gameMode.- Specified by:
setGameMode
in classPlotPlayer<Actor>
- Parameters:
gameMode
- the gamemode to set
-
setTime
Description copied from class:PlotPlayer
Set this player's local time (ticks).- Specified by:
setTime
in classPlotPlayer<Actor>
- Parameters:
time
- the time visible to the player
-
getFlight
Description copied from class:PlotPlayer
Determines whether or not the player can fly.- Specified by:
getFlight
in classPlotPlayer<Actor>
- Returns:
true
if the player is allowed to fly
-
setFlight
Description copied from class:PlotPlayer
Sets whether or not this player can fly.- Specified by:
setFlight
in classPlotPlayer<Actor>
- Parameters:
fly
-true
if the player can fly, otherwisefalse
-
playMusic
Description copied from class:PlotPlayer
Play music at a location for this player.- Specified by:
playMusic
in classPlotPlayer<Actor>
- Parameters:
location
- where to play the musicid
- the record item id
-
kick
Description copied from class:PlotPlayer
Kick this player from the game.- Specified by:
kick
in classPlotPlayer<Actor>
- Parameters:
message
- the reason for the kick
-
stopSpectating
- Specified by:
stopSpectating
in classPlotPlayer<Actor>
-
isBanned
Description copied from class:PlotPlayer
Check if this player is banned.- Specified by:
isBanned
in classPlotPlayer<Actor>
- Returns:
true
if the player is banned,false
otherwise.
-
getAudience
Description copied from class:PlotPlayer
Get theAudience
that represents this plot player- Specified by:
getAudience
in classPlotPlayer<Actor>
- Returns:
- Player audience
-
removeEffect
Description copied from class:PlotPlayer
Removes any effects present of the given type.- Specified by:
removeEffect
in classPlotPlayer<Actor>
- Parameters:
name
- the name of the type to remove
-
canSee
Description copied from class:PlotPlayer
Check if the player is able to see the other player. This does not mean that the other player is in line of sight of the player, but rather that the player is permitted to see the other player.- Specified by:
canSee
in classPlotPlayer<Actor>
- Parameters:
other
- Other player- Returns:
true
if the player is able to see the other player,false
if not
-