Class StatisticsMock

java.lang.Object
be.seeseemelk.mockbukkit.statistic.StatisticsMock

public class StatisticsMock extends Object
An implementation of player statistics, similar to CraftStatistic
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    decrementStatistic(@NotNull org.bukkit.Statistic statistic, int value)
    Decrements the given statistic for this player.
    void
    decrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material, int value)
    Decrements the given statistic for this player for the given material.
    void
    decrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType, int value)
    Decrements the given statistic for this player for the given entity.
    int
    getStatistic(@NotNull org.bukkit.Statistic statistic)
    Gets the value of the given statistic for this player.
    int
    getStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material)
    Gets the value of the given statistic for this player.
    int
    getStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType)
    Gets the value of the given statistic for this player.
    void
    incrementStatistic(@NotNull org.bukkit.Statistic statistic, int value)
    Increments the given statistic for this player.
    void
    incrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material, int value)
    Increments the given statistic for this player for the given material.
    void
    incrementStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType, int value)
    Increments the given statistic for this player for the given entity.
    void
    setStatistic(@NotNull org.bukkit.Statistic statistic, int value)
    Sets the given statistic for this player.
    void
    setStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.Material material, int value)
    Sets the given statistic for this player for the given material.
    void
    setStatistic(@NotNull org.bukkit.Statistic statistic, @NotNull org.bukkit.entity.EntityType entityType, int value)
    Sets the given statistic for this player for the given entity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • StatisticsMock

      public StatisticsMock()
  • Method Details

    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int value)
      Sets the given statistic for this player.
      Parameters:
      statistic - Statistic to set
      value - The value to set this statistic to
      See Also:
      • OfflinePlayer.setStatistic(Statistic, int)
    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int value)
      Sets the given statistic for this player for the given material.
      Parameters:
      statistic - Statistic to set
      material - Material to offset the statistic with
      value - The value to set this statistic to
      See Also:
      • OfflinePlayer.setStatistic(Statistic, Material, int)
    • setStatistic

      public void setStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int value)
      Sets the given statistic for this player for the given entity.
      Parameters:
      statistic - Statistic to set
      entityType - EntityType to offset the statistic with
      value - The value to set this statistic to
      See Also:
      • OfflinePlayer.setStatistic(Statistic, EntityType, int)
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int value)
      Increments the given statistic for this player.
      Parameters:
      statistic - Statistic to increment
      value - Amount to increment this statistic by
      See Also:
      • OfflinePlayer.incrementStatistic(Statistic, int)
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int value)
      Increments the given statistic for this player for the given material.
      Parameters:
      statistic - Statistic to increment
      material - Material to offset the statistic with
      value - Amount to increment this statistic by
      See Also:
      • OfflinePlayer.incrementStatistic(Statistic, Material, int)
    • incrementStatistic

      public void incrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int value)
      Increments the given statistic for this player for the given entity.
      Parameters:
      statistic - Statistic to increment
      entityType - EntityType to offset the statistic with
      value - Amount to increment this statistic by
      See Also:
      • OfflinePlayer.incrementStatistic(Statistic, EntityType, int)
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, int value)
      Decrements the given statistic for this player.
      Parameters:
      statistic - Statistic to decrement
      value - Amount to decrement this statistic by
      See Also:
      • OfflinePlayer.decrementStatistic(Statistic, int)
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material, int value)
      Decrements the given statistic for this player for the given material.
      Parameters:
      statistic - Statistic to decrement
      material - Material to offset the statistic with
      value - Amount to decrement this statistic by
      See Also:
      • OfflinePlayer.decrementStatistic(Statistic, Material, int)
    • decrementStatistic

      public void decrementStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType, int value)
      Decrements the given statistic for this player for the given entity.
      Parameters:
      statistic - Statistic to decrement
      entityType - EntityType to offset the statistic with
      value - Amount to decrement this statistic by for the statistic
      See Also:
      • OfflinePlayer.decrementStatistic(Statistic, EntityType, int)
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic)
      Gets the value of the given statistic for this player.
      Parameters:
      statistic - Statistic to check
      Returns:
      the value of the given statistic
      See Also:
      • OfflinePlayer.getStatistic(Statistic)
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.Material material)
      Gets the value of the given statistic for this player.
      Parameters:
      statistic - Statistic to check
      material - Material offset of the statistic
      Returns:
      the value of the given statistic
      See Also:
      • OfflinePlayer.getStatistic(Statistic, Material)
    • getStatistic

      public int getStatistic(@NotNull @NotNull org.bukkit.Statistic statistic, @NotNull @NotNull org.bukkit.entity.EntityType entityType)
      Gets the value of the given statistic for this player.
      Parameters:
      statistic - Statistic to check
      entityType - EntityType offset of the statistic
      Returns:
      the value of the given statistic for the statistic
      See Also:
      • OfflinePlayer.getStatistic(Statistic, EntityType)