Class HoneypotPlayerManager

java.lang.Object
org.reprogle.honeypot.common.storagemanager.HoneypotPlayerManager

public class HoneypotPlayerManager extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPlayer(org.bukkit.entity.Player player, int blocksBroken)
    Create a honeypot block by calling the SQLite DB.
    void
    Delete's all players in the DB
    int
    getCount(org.bukkit.entity.Player player)
    Gets the amount of Honeypots the player has broken.
    int
    getCount(org.bukkit.OfflinePlayer player)
    Gets the amount of Honeypots the player has broken.
    Returns the singleton instance of this class
    void
    setPlayerCount(org.bukkit.entity.Player player, int blocksBroken)
    Set the number of blocks broken by the player by calling the SQLite setPlayerCount function.

    Methods inherited from class java.lang.Object

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

    • HoneypotPlayerManager

      public HoneypotPlayerManager()
  • Method Details

    • getInstance

      public static HoneypotPlayerManager getInstance()
      Returns the singleton instance of this class
      Returns:
      The HoneypotPlayerManager instance
    • addPlayer

      public void addPlayer(org.bukkit.entity.Player player, int blocksBroken)
      Create a honeypot block by calling the SQLite DB. In the future this will be a switch case statement to handle multiple DB types
      Parameters:
      player - The Player object
      blocksBroken - The amount of Blocks broken
    • setPlayerCount

      public void setPlayerCount(org.bukkit.entity.Player player, int blocksBroken)
      Set the number of blocks broken by the player by calling the SQLite setPlayerCount function. In the future this will be a switch case statement to handle multiple DB types without changing code
      Parameters:
      player - The Player object
      blocksBroken - The amount of blocks broken by the player
    • getCount

      public int getCount(org.bukkit.entity.Player player)
      Gets the amount of Honeypots the player has broken. This is NOT the total, but rather the current amount until it loops to 0, based on the config
      Parameters:
      player - the Player object
      Returns:
      The amount of Honeypot blocks the player has broken
    • getCount

      public int getCount(org.bukkit.OfflinePlayer player)
      Gets the amount of Honeypots the player has broken. This is NOT the total, but rather the current amount until it loops to 0, based on the config
      Parameters:
      player - the Player name
      Returns:
      The amount of Honeypot blocks the player has broken
    • deleteAllHoneypotPlayers

      public void deleteAllHoneypotPlayers()
      Delete's all players in the DB