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 TypeMethodDescriptionbooleancanSee(PlotPlayer<?> other) Check if the player is able to see the other player.booleancanTeleport(@NonNull Location location) booleangetAttribute(String key) Retrieves the attribute of this player.Get theAudiencethat represents this plot playerstatic ConsolePlayerbooleanDetermines whether or not the player can fly.Get this player's gamemode.longGets 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.booleanhasPermission(@NonNull String permission) Check the player's permissions.booleanisBanned()Check if this player is banned.voidKick this player from the game.voidPlay music at a location for this player.voidremoveAttribute(String key) Remove an attribute from a player.voidremoveEffect(@NonNull String name) Removes any effects present of the given type.voidsendMessage(@NonNull Caption caption, @NonNull net.kyori.adventure.text.minimessage.Template... replacements) Send a message to the command callervoidsendTitle(@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 playervoidsetAttribute(String key) Set player data that will persist restarts.voidsetCompassTarget(Location location) Set this compass target.voidsetFlight(boolean fly) Sets whether or not this player can fly.voidsetGameMode(@NonNull GameMode gameMode) Set this player's gameMode.voidsetTime(long time) Set this player's local time (ticks).voidsetWeather(@NonNull PlotWeather weather) Sets the local weather for this Player.voidvoidteleport(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, unregisterMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.plotsquared.core.permissions.PermissionHolder
hasKeyedPermission, hasPermission, hasPermission, hasPermissionRange, hasPermissionRange
-
Method Details
-
getConsole
-
toActor
- Specified by:
toActorin classPlotPlayer<Actor>
-
getPlatformPlayer
- Specified by:
getPlatformPlayerin classPlotPlayer<Actor>
-
canTeleport
- Overrides:
canTeleportin classPlotPlayer<Actor>
-
sendTitle
public void sendTitle(@NonNull Caption title, @NonNull Caption subtitle, int fadeIn, int stay, int fadeOut, @NonNull net.kyori.adventure.text.minimessage.Template... replacements) Description copied from class:PlotPlayerSend a title to the player- Overrides:
sendTitlein classPlotPlayer<Actor>- Parameters:
title- Titlesubtitle- SubtitlefadeIn- Fade in time (in ticks)stay- The title stays for (in ticks)fadeOut- Fade out time (in ticks)replacements- Variable replacements
-
getLocation
Description copied from class:PlotPlayerGet this player's last recorded location or null if they don't any plot relevant location.- Overrides:
getLocationin classPlotPlayer<Actor>- Returns:
- The location
-
getLocationFull
Description copied from class:PlotPlayerGet this player's full location (including yaw/pitch)- Specified by:
getLocationFullin classPlotPlayer<Actor>- Returns:
- location
-
getUUID
Description copied from class:PlotPlayerGet 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:
getUUIDin interfaceOfflinePlotPlayer- Specified by:
getUUIDin classPlotPlayer<Actor>- Returns:
- UUID
-
getLastPlayed
Description copied from interface:OfflinePlotPlayerGets the time in milliseconds when the player was last seen online.- Returns:
- the time in milliseconds when last online
-
hasPermission
Description copied from interface:CommandCallerCheck the player's permissions. Will be cached if permission caching is enabled.- Specified by:
hasPermissionin interfaceCommandCaller- Specified by:
hasPermissionin interfacePermissionHolder- Overrides:
hasPermissionin classPlotPlayer<Actor>- Parameters:
permission- the name of the permission- Returns:
- if permission is had
-
sendMessage
public void sendMessage(@NonNull Caption caption, @NonNull net.kyori.adventure.text.minimessage.Template... replacements) Description copied from interface:CommandCallerSend a message to the command caller- Specified by:
sendMessagein interfaceCommandCaller- Overrides:
sendMessagein classPlotPlayer<Actor>- Parameters:
caption- Caption to sendreplacements- Variable replacements
-
teleport
Description copied from class:PlotPlayerTeleport this player to a location.- Specified by:
teleportin classPlotPlayer<Actor>- Parameters:
location- the target locationcause- the cause of the teleport
-
getName
Description copied from interface:OfflinePlotPlayerGets the name of this player.- Returns:
- the player name
-
setCompassTarget
Description copied from class:PlotPlayerSet this compass target.- Specified by:
setCompassTargetin classPlotPlayer<Actor>- Parameters:
location- the target location
-
setAttribute
Description copied from class:PlotPlayerSet player data that will persist restarts. - Please note that this is not intended to store large values - For session only data use meta- Overrides:
setAttributein classPlotPlayer<Actor>- Parameters:
key- metadata key
-
getAttribute
Description copied from class:PlotPlayerRetrieves the attribute of this player.- Overrides:
getAttributein classPlotPlayer<Actor>- Parameters:
key- metadata key- Returns:
- the attribute will be either
trueorfalse
-
removeAttribute
Description copied from class:PlotPlayerRemove an attribute from a player.- Overrides:
removeAttributein classPlotPlayer<Actor>- Parameters:
key- metadata key
-
getSuperCaller
Description copied from interface:CommandCallerGet the type of the caller- Specified by:
getSuperCallerin interfaceCommandCaller- Overrides:
getSuperCallerin classPlotPlayer<Actor>- Returns:
- Caller type
-
setWeather
Description copied from class:PlotPlayerSets the local weather for this Player.- Specified by:
setWeatherin classPlotPlayer<Actor>- Parameters:
weather- the weather visible to the player
-
getGameMode
Description copied from class:PlotPlayerGet this player's gamemode.- Specified by:
getGameModein classPlotPlayer<Actor>- Returns:
- the gamemode of the player.
-
setGameMode
Description copied from class:PlotPlayerSet this player's gameMode.- Specified by:
setGameModein classPlotPlayer<Actor>- Parameters:
gameMode- the gamemode to set
-
setTime
Description copied from class:PlotPlayerSet this player's local time (ticks).- Specified by:
setTimein classPlotPlayer<Actor>- Parameters:
time- the time visible to the player
-
getFlight
Description copied from class:PlotPlayerDetermines whether or not the player can fly.- Specified by:
getFlightin classPlotPlayer<Actor>- Returns:
trueif the player is allowed to fly
-
setFlight
Description copied from class:PlotPlayerSets whether or not this player can fly.- Specified by:
setFlightin classPlotPlayer<Actor>- Parameters:
fly-trueif the player can fly, otherwisefalse
-
playMusic
Description copied from class:PlotPlayerPlay music at a location for this player.- Specified by:
playMusicin classPlotPlayer<Actor>- Parameters:
location- where to play the musicid- the record item id
-
kick
Description copied from class:PlotPlayerKick this player from the game.- Specified by:
kickin classPlotPlayer<Actor>- Parameters:
message- the reason for the kick
-
stopSpectating
- Specified by:
stopSpectatingin classPlotPlayer<Actor>
-
isBanned
Description copied from class:PlotPlayerCheck if this player is banned.- Specified by:
isBannedin classPlotPlayer<Actor>- Returns:
trueif the player is banned,falseotherwise.
-
getAudience
Description copied from class:PlotPlayerGet theAudiencethat represents this plot player- Specified by:
getAudiencein classPlotPlayer<Actor>- Returns:
- Player audience
-
removeEffect
Description copied from class:PlotPlayerRemoves any effects present of the given type.- Specified by:
removeEffectin classPlotPlayer<Actor>- Parameters:
name- the name of the type to remove
-
canSee
Description copied from class:PlotPlayerCheck 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:
canSeein classPlotPlayer<Actor>- Parameters:
other- Other player- Returns:
trueif the player is able to see the other player,falseif not
-