Package com.plotsquared.bukkit.player
Class BukkitPlayer
- All Implemented Interfaces:
CommandCaller
,LocaleHolder
,PermissionHolder
,OfflinePlotPlayer
-
Nested Class Summary
Nested classes/interfaces inherited from class com.plotsquared.core.player.PlotPlayer
PlotPlayer.PlotPlayerConverter<BaseObject extends Object>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBukkitPlayer
(@NonNull PlotAreaManager plotAreaManager, @NonNull EventDispatcher eventDispatcher, @NonNull Player player, boolean realPlayer, @NonNull PermissionHandler permissionHandler) BukkitPlayer
(@NonNull PlotAreaManager plotAreaManager, @NonNull EventDispatcher eventDispatcher, @NonNull Player player, @NonNull PermissionHandler permissionHandler) Please do not use this method. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canSee
(PlotPlayer<?> other) boolean
canTeleport
(@NonNull Location location) boolean
com.sk89q.worldedit.world.gamemode.GameMode
@org.checkerframework.checker.index.qual.NonNegative long
getName()
Convert from PlotSquared'sTeleportCause
to Bukkit'sPlayerTeleportEvent.TeleportCause
getUUID()
@org.checkerframework.checker.index.qual.NonNegative int
hasPermissionRange
(@NonNull String stub, @org.checkerframework.checker.index.qual.NonNegative int range) boolean
isBanned()
void
void
void
removeEffect
(@NonNull String name) void
setCompassTarget
(Location location) void
setFlight
(boolean fly) void
setGameMode
(com.sk89q.worldedit.world.gamemode.GameMode gameMode) void
setTime
(long time) void
setWeather
(@NonNull PlotWeather weather) void
void
teleport
(@NonNull Location location, @NonNull TeleportCause cause) com.sk89q.worldedit.extension.platform.Actor
toActor()
Methods inherited from class com.plotsquared.core.player.PlotPlayer
accessPersistentMetaData, accessTemporaryMetaData, equals, from, getAllowedPlots, getApplicablePlotArea, getAttribute, getClusterCount, getClusterCount, getCurrentPlot, getDebugModePlayers, getDebugModePlayersInPlot, getLocale, getLocation, getLockRepository, getMeta, getPlayerClusterCount, getPlayerClusterCount, getPlotAreaAbs, getPlotCount, getPlotCount, getPlots, getPlots, getSuperCaller, hasDebugMode, hashCode, hasKeyedPermission, hasPermission, hasPermission, plotkick, populatePersistentMetaMap, refreshDebug, registerConverter, removeAttribute, sendActionBar, sendMessage, sendTitle, sendTitle, setAttribute, 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
-
Field Details
-
player
-
-
Constructor Details
-
BukkitPlayer
public BukkitPlayer(@NonNull PlotAreaManager plotAreaManager, @NonNull EventDispatcher eventDispatcher, @NonNull Player player, @NonNull PermissionHandler permissionHandler) Please do not use this method. Instead use BukkitUtil.getPlayer(Player), as it caches player objects.
- Parameters:
plotAreaManager
- PlotAreaManager instanceeventDispatcher
- EventDispatcher instanceplayer
- Bukkit player instancepermissionHandler
- PermissionHandler instance
-
BukkitPlayer
public BukkitPlayer(@NonNull PlotAreaManager plotAreaManager, @NonNull EventDispatcher eventDispatcher, @NonNull Player player, boolean realPlayer, @NonNull PermissionHandler permissionHandler)
-
-
Method Details
-
toActor
public com.sk89q.worldedit.extension.platform.Actor toActor()- Specified by:
toActor
in classPlotPlayer<Player>
-
getPlatformPlayer
- Specified by:
getPlatformPlayer
in classPlotPlayer<Player>
-
getUUID
- Specified by:
getUUID
in interfaceOfflinePlotPlayer
- Specified by:
getUUID
in classPlotPlayer<Player>
-
getLastPlayed
public @org.checkerframework.checker.index.qual.NonNegative long getLastPlayed() -
canTeleport
- Overrides:
canTeleport
in classPlotPlayer<Player>
-
hasPermissionRange
-
teleport
- Specified by:
teleport
in classPlotPlayer<Player>
-
getName
-
setCompassTarget
- Specified by:
setCompassTarget
in classPlotPlayer<Player>
-
getLocationFull
- Specified by:
getLocationFull
in classPlotPlayer<Player>
-
setWeather
- Specified by:
setWeather
in classPlotPlayer<Player>
-
getGameMode
public com.sk89q.worldedit.world.gamemode.GameMode getGameMode()- Specified by:
getGameMode
in classPlotPlayer<Player>
-
setGameMode
public void setGameMode(com.sk89q.worldedit.world.gamemode.GameMode gameMode) - Specified by:
setGameMode
in classPlotPlayer<Player>
-
setTime
public void setTime(long time) - Specified by:
setTime
in classPlotPlayer<Player>
-
getFlight
public boolean getFlight()- Specified by:
getFlight
in classPlotPlayer<Player>
-
setFlight
public void setFlight(boolean fly) - Specified by:
setFlight
in classPlotPlayer<Player>
-
playMusic
public void playMusic(@NonNull Location location, @NonNull com.sk89q.worldedit.world.item.ItemType id) - Specified by:
playMusic
in classPlotPlayer<Player>
-
kick
- Specified by:
kick
in classPlotPlayer<Player>
-
stopSpectating
public void stopSpectating()- Specified by:
stopSpectating
in classPlotPlayer<Player>
-
isBanned
public boolean isBanned()- Specified by:
isBanned
in classPlotPlayer<Player>
-
getAudience
- Specified by:
getAudience
in classPlotPlayer<Player>
-
removeEffect
- Specified by:
removeEffect
in classPlotPlayer<Player>
-
canSee
- Specified by:
canSee
in classPlotPlayer<Player>
-
getTeleportCause
Convert from PlotSquared'sTeleportCause
to Bukkit'sPlayerTeleportEvent.TeleportCause
- Parameters:
cause
- PlotSquared teleport cause to convert- Returns:
- Bukkit's equivalent teleport cause
-