Class HoneypotPlayerHistoryManager

java.lang.Object
org.reprogle.honeypot.storagemanager.HoneypotPlayerHistoryManager

public class HoneypotPlayerHistoryManager extends Object
A class for managing Honeypot history entries. Adds functions for creating, removing, querying, and purging the history database.
See Also:
  • Constructor Details

    • HoneypotPlayerHistoryManager

      public HoneypotPlayerHistoryManager()
  • Method Details

    • getInstance

      public static HoneypotPlayerHistoryManager getInstance()
      Returns the singleton instance of this class
      Returns:
      The HoneypotPlayerHistoryManager instance
    • addPlayerHistory

      public void addPlayerHistory(org.bukkit.entity.Player p, HoneypotBlockObject b)
      Add an entry to the player history table
      Parameters:
      p - The player to add
      b - The honeypot block they triggered
    • getPlayerHistory

      public List<HoneypotPlayerHistoryObject> getPlayerHistory(org.bukkit.entity.Player p)
      Get the history for a player
      Parameters:
      p - The player to grab history for
      Returns:
      A list of all HoneypotPlayerHistory objects
    • deletePlayerHistory

      public void deletePlayerHistory(org.bukkit.entity.Player p, int... n)
      Delete all history for a particular player. An optional n parameter for specifying the number of most recent rows to delete
      Parameters:
      p - The player to delete
      n - Optional, the number of most recent rows
    • deleteAllHistory

      public void deleteAllHistory()
      A function to purge the entire history table