Class OfflinePlayerMock

java.lang.Object
be.seeseemelk.mockbukkit.entity.OfflinePlayerMock
All Implemented Interfaces:
org.bukkit.configuration.serialization.ConfigurationSerializable, org.bukkit.entity.AnimalTamer, org.bukkit.OfflinePlayer, org.bukkit.permissions.ServerOperator

public class OfflinePlayerMock extends Object implements org.bukkit.OfflinePlayer
A Mock specifically for OfflinePlayer. Not interchangeable with PlayerMock.
See Also:
  • Constructor Details

    • OfflinePlayerMock

      public OfflinePlayerMock(UUID uuid, String name)
    • OfflinePlayerMock

      public OfflinePlayerMock(String name)
  • Method Details

    • join

      public PlayerMock join(ServerMock server)
    • isOnline

      public boolean isOnline()
      Specified by:
      isOnline in interface org.bukkit.OfflinePlayer
    • getName

      @Nullable public @Nullable String getName()
      Specified by:
      getName in interface org.bukkit.entity.AnimalTamer
      Specified by:
      getName in interface org.bukkit.OfflinePlayer
    • getUniqueId

      @NotNull public @NotNull UUID getUniqueId()
      Specified by:
      getUniqueId in interface org.bukkit.entity.AnimalTamer
      Specified by:
      getUniqueId in interface org.bukkit.OfflinePlayer
    • isOp

      public boolean isOp()
      Specified by:
      isOp in interface org.bukkit.permissions.ServerOperator
    • setOp

      public void setOp(boolean value)
      Specified by:
      setOp in interface org.bukkit.permissions.ServerOperator
    • serialize

      @NotNull public @NotNull Map<String,Object> serialize()
      Specified by:
      serialize in interface org.bukkit.configuration.serialization.ConfigurationSerializable
    • isBanned

      public boolean isBanned()
      Specified by:
      isBanned in interface org.bukkit.OfflinePlayer
    • isWhitelisted

      public boolean isWhitelisted()
      Specified by:
      isWhitelisted in interface org.bukkit.OfflinePlayer
    • setWhitelisted

      public void setWhitelisted(boolean value)
      Specified by:
      setWhitelisted in interface org.bukkit.OfflinePlayer
    • getPlayer

      @Nullable public @Nullable org.bukkit.entity.Player getPlayer()
      Specified by:
      getPlayer in interface org.bukkit.OfflinePlayer
    • getFirstPlayed

      public long getFirstPlayed()
      Specified by:
      getFirstPlayed in interface org.bukkit.OfflinePlayer
    • getLastPlayed

      @Deprecated public long getLastPlayed()
      Deprecated.
      Specified by:
      getLastPlayed in interface org.bukkit.OfflinePlayer
    • hasPlayedBefore

      public boolean hasPlayedBefore()
      Specified by:
      hasPlayedBefore in interface org.bukkit.OfflinePlayer
    • getBedSpawnLocation

      @Nullable public @Nullable org.bukkit.Location getBedSpawnLocation()
      Specified by:
      getBedSpawnLocation in interface org.bukkit.OfflinePlayer
    • getLastLogin

      public long getLastLogin()
      Specified by:
      getLastLogin in interface org.bukkit.OfflinePlayer
    • getLastSeen

      public long getLastSeen()
      Specified by:
      getLastSeen in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int amount)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int amount)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int newValue)
      Specified by:
      setStatistic in interface org.bukkit.OfflinePlayer
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic)
      Specified by:
      getStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material)
      Specified by:
      getStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int amount)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int amount)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int newValue)
      Specified by:
      setStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType)
      Specified by:
      getStatistic in interface org.bukkit.OfflinePlayer
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int amount)
      Specified by:
      incrementStatistic in interface org.bukkit.OfflinePlayer
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int amount)
      Specified by:
      decrementStatistic in interface org.bukkit.OfflinePlayer
    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int newValue)
      Specified by:
      setStatistic in interface org.bukkit.OfflinePlayer
    • getLastDeathLocation

      @Nullable public @Nullable org.bukkit.Location getLastDeathLocation()
      Specified by:
      getLastDeathLocation in interface org.bukkit.OfflinePlayer
    • getPlayerProfile

      @NotNull public @NotNull org.bukkit.profile.PlayerProfile getPlayerProfile()
      Specified by:
      getPlayerProfile in interface org.bukkit.OfflinePlayer