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) Deprecated, for removal: This API element is subject to removal in a future version.Please do not use this method.BukkitPlayer
(@NonNull PlotAreaManager plotAreaManager, @NonNull EventDispatcher eventDispatcher, @NonNull Player player, @NonNull PermissionHandler permissionHandler) Deprecated, for removal: This API element is subject to removal in a future version.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, 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, hasPermission, hasPermission, hasPermissionRange
-
Field Details
-
player
-
-
Constructor Details
-
BukkitPlayer
@Deprecated(forRemoval=true, since="6.10.9") public BukkitPlayer(@NonNull PlotAreaManager plotAreaManager, @NonNull EventDispatcher eventDispatcher, @NonNull Player player, @NonNull PermissionHandler permissionHandler) Deprecated, for removal: This API element is subject to removal in a future version.Please do not use this method. Instead useBukkitUtil.adapt(Player)
, as it caches player objects. This method will be made private in a future release.- Parameters:
plotAreaManager
- PlotAreaManager instanceeventDispatcher
- EventDispatcher instanceplayer
- Bukkit player instancepermissionHandler
- PermissionHandler instance
-
BukkitPlayer
@Deprecated(forRemoval=true, since="6.10.9") public BukkitPlayer(@NonNull PlotAreaManager plotAreaManager, @NonNull EventDispatcher eventDispatcher, @NonNull Player player, boolean realPlayer, @NonNull PermissionHandler permissionHandler) Deprecated, for removal: This API element is subject to removal in a future version.Please do not use this method. Instead useBukkitUtil.adapt(Player)
, as it caches player objects. This method will be made private in a future release.- Parameters:
plotAreaManager
- PlotAreaManager instanceeventDispatcher
- EventDispatcher instanceplayer
- Bukkit player instancepermissionHandler
- PermissionHandler instance
-
-
Method Details
-
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
-
canTeleport
- Overrides:
canTeleport
in classPlotPlayer<Player>
-
hasPermissionRange
public @org.checkerframework.checker.index.qual.NonNegative int hasPermissionRange(@NonNull String stub, @org.checkerframework.checker.index.qual.NonNegative int range) -
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
- Specified by:
getGameMode
in classPlotPlayer<Player>
-
setGameMode
- Specified by:
setGameMode
in classPlotPlayer<Player>
-
setTime
- Specified by:
setTime
in classPlotPlayer<Player>
-
getFlight
- Specified by:
getFlight
in classPlotPlayer<Player>
-
setFlight
- 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
- Specified by:
stopSpectating
in classPlotPlayer<Player>
-
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
-