Class GPPlayerData

java.lang.Object
me.EtienneDx.RealEstate.ClaimAPI.GriefPrevention.GPPlayerData
All Implemented Interfaces:
IPlayerData

public class GPPlayerData extends Object implements IPlayerData
GPPlayerData is an implementation of the IPlayerData interface for GriefPrevention. It wraps a GriefPrevention PlayerData object and provides access to a player's claim block data.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GPPlayerData(me.ryanhamshire.GriefPrevention.PlayerData playerData)
    Constructs a new GPPlayerData instance that wraps the provided PlayerData.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieves the number of accrued claim blocks for the player.
    int
    Retrieves the number of bonus claim blocks for the player.
    int
    Retrieves the number of remaining claim blocks available for the player.
    void
    setAccruedClaimBlocks(int accruedClaimBlocks)
    Sets the number of accrued claim blocks for the player.
    void
    setBonusClaimBlocks(int bonusClaimBlocks)
    Sets the number of bonus claim blocks for the player.

    Methods inherited from class java.lang.Object

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

    • GPPlayerData

      public GPPlayerData(me.ryanhamshire.GriefPrevention.PlayerData playerData)
      Constructs a new GPPlayerData instance that wraps the provided PlayerData.
      Parameters:
      playerData - the GriefPrevention PlayerData instance to wrap
  • Method Details

    • getAccruedClaimBlocks

      public int getAccruedClaimBlocks()
      Retrieves the number of accrued claim blocks for the player.
      Specified by:
      getAccruedClaimBlocks in interface IPlayerData
      Returns:
      the accrued claim blocks
    • getBonusClaimBlocks

      public int getBonusClaimBlocks()
      Retrieves the number of bonus claim blocks for the player.
      Specified by:
      getBonusClaimBlocks in interface IPlayerData
      Returns:
      the bonus claim blocks
    • setAccruedClaimBlocks

      public void setAccruedClaimBlocks(int accruedClaimBlocks)
      Sets the number of accrued claim blocks for the player.
      Specified by:
      setAccruedClaimBlocks in interface IPlayerData
      Parameters:
      accruedClaimBlocks - the new value for accrued claim blocks
    • setBonusClaimBlocks

      public void setBonusClaimBlocks(int bonusClaimBlocks)
      Sets the number of bonus claim blocks for the player.
      Specified by:
      setBonusClaimBlocks in interface IPlayerData
      Parameters:
      bonusClaimBlocks - the new value for bonus claim blocks
    • getRemainingClaimBlocks

      public int getRemainingClaimBlocks()
      Retrieves the number of remaining claim blocks available for the player.
      Specified by:
      getRemainingClaimBlocks in interface IPlayerData
      Returns:
      the remaining claim blocks