Class BukkitPlayer

java.lang.Object
com.plotsquared.core.player.PlotPlayer<Player>
com.plotsquared.bukkit.player.BukkitPlayer
All Implemented Interfaces:
com.plotsquared.core.command.CommandCaller, com.plotsquared.core.configuration.caption.LocaleHolder, com.plotsquared.core.permissions.PermissionHolder, com.plotsquared.core.player.OfflinePlotPlayer

public class BukkitPlayer extends com.plotsquared.core.player.PlotPlayer<Player>
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.plotsquared.core.player.PlotPlayer

    com.plotsquared.core.player.PlotPlayer.PlotPlayerConverter<BaseObject extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final Player
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BukkitPlayer(@NonNull com.plotsquared.core.plot.world.PlotAreaManager plotAreaManager, @NonNull com.plotsquared.core.util.EventDispatcher eventDispatcher, @NonNull Player player, boolean realPlayer, @NonNull com.plotsquared.core.permissions.PermissionHandler permissionHandler)
     
    BukkitPlayer(@NonNull com.plotsquared.core.plot.world.PlotAreaManager plotAreaManager, @NonNull com.plotsquared.core.util.EventDispatcher eventDispatcher, @NonNull Player player, @NonNull com.plotsquared.core.permissions.PermissionHandler permissionHandler)
    Please do not use this method.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canSee(com.plotsquared.core.player.PlotPlayer<?> other)
     
    boolean
    canTeleport(@NonNull com.plotsquared.core.location.Location location)
     
     
    boolean
     
     
    @org.checkerframework.checker.index.qual.NonNegative long
     
    com.plotsquared.core.location.Location
     
     
     
    getTeleportCause(@NonNull com.plotsquared.core.events.TeleportCause cause)
    Convert from PlotSquared's TeleportCause to Bukkit's PlayerTeleportEvent.TeleportCause
     
    @org.checkerframework.checker.index.qual.NonNegative int
    hasPermissionRange(@NonNull String stub, @org.checkerframework.checker.index.qual.NonNegative int range)
     
    boolean
     
    void
    kick(String message)
     
    void
    playMusic(@NonNull com.plotsquared.core.location.Location location, @NonNull ItemType id)
     
    void
    setCompassTarget(com.plotsquared.core.location.Location location)
     
    void
    setFlight(boolean fly)
     
    void
     
    void
    setTime(long time)
     
    void
    setWeather(@NonNull com.plotsquared.core.plot.PlotWeather weather)
     
    void
     
    void
    teleport(@NonNull com.plotsquared.core.location.Location location, @NonNull com.plotsquared.core.events.TeleportCause cause)
     
     

    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

      public final Player player
  • Constructor Details

    • BukkitPlayer

      public BukkitPlayer(@NonNull com.plotsquared.core.plot.world.PlotAreaManager plotAreaManager, @NonNull com.plotsquared.core.util.EventDispatcher eventDispatcher, @NonNull Player player, @NonNull com.plotsquared.core.permissions.PermissionHandler permissionHandler)

      Please do not use this method. Instead use BukkitUtil.getPlayer(Player), as it caches player objects.

      Parameters:
      plotAreaManager - PlotAreaManager instance
      eventDispatcher - EventDispatcher instance
      player - Bukkit player instance
      permissionHandler - PermissionHandler instance
    • BukkitPlayer

      public BukkitPlayer(@NonNull com.plotsquared.core.plot.world.PlotAreaManager plotAreaManager, @NonNull com.plotsquared.core.util.EventDispatcher eventDispatcher, @NonNull Player player, boolean realPlayer, @NonNull com.plotsquared.core.permissions.PermissionHandler permissionHandler)
  • Method Details

    • toActor

      public Actor toActor()
      Specified by:
      toActor in class com.plotsquared.core.player.PlotPlayer<Player>
    • getPlatformPlayer

      public Player getPlatformPlayer()
      Specified by:
      getPlatformPlayer in class com.plotsquared.core.player.PlotPlayer<Player>
    • getUUID

      public @NonNull UUID getUUID()
      Specified by:
      getUUID in interface com.plotsquared.core.player.OfflinePlotPlayer
      Specified by:
      getUUID in class com.plotsquared.core.player.PlotPlayer<Player>
    • getLastPlayed

      public @org.checkerframework.checker.index.qual.NonNegative long getLastPlayed()
    • canTeleport

      public boolean canTeleport(@NonNull com.plotsquared.core.location.Location location)
      Overrides:
      canTeleport in class com.plotsquared.core.player.PlotPlayer<Player>
    • hasPermissionRange

      public @org.checkerframework.checker.index.qual.NonNegative int hasPermissionRange(@NonNull String stub, @org.checkerframework.checker.index.qual.NonNegative int range)
    • teleport

      public void teleport(@NonNull com.plotsquared.core.location.Location location, @NonNull com.plotsquared.core.events.TeleportCause cause)
      Specified by:
      teleport in class com.plotsquared.core.player.PlotPlayer<Player>
    • getName

      public String getName()
    • setCompassTarget

      public void setCompassTarget(com.plotsquared.core.location.Location location)
      Specified by:
      setCompassTarget in class com.plotsquared.core.player.PlotPlayer<Player>
    • getLocationFull

      public com.plotsquared.core.location.Location getLocationFull()
      Specified by:
      getLocationFull in class com.plotsquared.core.player.PlotPlayer<Player>
    • setWeather

      public void setWeather(@NonNull com.plotsquared.core.plot.PlotWeather weather)
      Specified by:
      setWeather in class com.plotsquared.core.player.PlotPlayer<Player>
    • getGameMode

      public GameMode getGameMode()
      Specified by:
      getGameMode in class com.plotsquared.core.player.PlotPlayer<Player>
    • setGameMode

      public void setGameMode(GameMode gameMode)
      Specified by:
      setGameMode in class com.plotsquared.core.player.PlotPlayer<Player>
    • setTime

      public void setTime(long time)
      Specified by:
      setTime in class com.plotsquared.core.player.PlotPlayer<Player>
    • getFlight

      public boolean getFlight()
      Specified by:
      getFlight in class com.plotsquared.core.player.PlotPlayer<Player>
    • setFlight

      public void setFlight(boolean fly)
      Specified by:
      setFlight in class com.plotsquared.core.player.PlotPlayer<Player>
    • playMusic

      public void playMusic(@NonNull com.plotsquared.core.location.Location location, @NonNull ItemType id)
      Specified by:
      playMusic in class com.plotsquared.core.player.PlotPlayer<Player>
    • kick

      public void kick(String message)
      Specified by:
      kick in class com.plotsquared.core.player.PlotPlayer<Player>
    • stopSpectating

      public void stopSpectating()
      Specified by:
      stopSpectating in class com.plotsquared.core.player.PlotPlayer<Player>
    • isBanned

      public boolean isBanned()
      Specified by:
      isBanned in class com.plotsquared.core.player.PlotPlayer<Player>
    • getAudience

      public @NonNull Audience getAudience()
      Specified by:
      getAudience in class com.plotsquared.core.player.PlotPlayer<Player>
    • canSee

      public boolean canSee(com.plotsquared.core.player.PlotPlayer<?> other)
      Specified by:
      canSee in class com.plotsquared.core.player.PlotPlayer<Player>
    • getTeleportCause

      public PlayerTeleportEvent.TeleportCause getTeleportCause(@NonNull com.plotsquared.core.events.TeleportCause cause)
      Convert from PlotSquared's TeleportCause to Bukkit's PlayerTeleportEvent.TeleportCause
      Parameters:
      cause - PlotSquared teleport cause to convert
      Returns:
      Bukkit's equivalent teleport cause