Class GraveManager

java.lang.Object
com.haven.havenplugin.graves.GraveManager

public class GraveManager extends Object
  • Constructor Details

  • Method Details

    • setInventoryManager

      public void setInventoryManager(GraveInventoryManager invManager)
      Must be called before loadGraves() or startCleanupTask().
    • reloadConfig

      public void reloadConfig()
    • isWorldAllowed

      public boolean isWorldAllowed(org.bukkit.World world)
    • openGraveInventory

      public void openGraveInventory(org.bukkit.entity.Player viewer, Grave grave, boolean readOnly)
    • autoCollect

      public void autoCollect(org.bukkit.entity.Player player, Grave grave)
    • syncInventoryToGrave

      public void syncInventoryToGrave(UUID graveId, org.bukkit.inventory.Inventory inv)
    • dropGraveContents

      public void dropGraveContents(Grave grave, org.bukkit.Location loc)
    • createGrave

      public boolean createGrave(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack[] items, int totalXp, String deathCause, long timeSinceLastDeath)
    • removeGrave

      public void removeGrave(UUID graveId, boolean dropItems, GraveRemoveReason reason)
    • restoreGrave

      public boolean restoreGrave(org.bukkit.command.CommandSender sender, UUID ownerId, String ownerName, UUID graveId)
      Restores a grave from its log file. If an active grave with the same UUID already exists, it is deleted without drops. A new spawn location is found near the original grave coordinates, and the grave is re-inserted into the live map with a fresh expiry.
      Returns:
      true on success
    • canLoot

      public boolean canLoot(org.bukkit.entity.Player player, Grave grave)
    • setGraveLocked

      public boolean setGraveLocked(UUID graveId, boolean locked)
    • notifyOwnerLooted

      public void notifyOwnerLooted(Grave grave, org.bukkit.entity.Player looter, boolean fully)
    • notifyGraveBroken

      public void notifyGraveBroken(Grave grave, org.bukkit.entity.Player breaker)
    • removeAllDisplays

      public void removeAllDisplays()
    • loadGraves

      public void loadGraves()
    • saveGraves

      public void saveGraves()
    • startCleanupTask

      public void startCleanupTask()
    • stopCleanupTask

      public void stopCleanupTask()
    • getGraveAt

      public Grave getGraveAt(org.bukkit.Location loc)
    • getGraveById

      public Grave getGraveById(UUID id)
    • getPlayerGraves

      public List<Grave> getPlayerGraves(UUID playerId)
    • getPlayerGrave

      public Grave getPlayerGrave(UUID playerId, int number)
    • isGraveBlock

      public boolean isGraveBlock(org.bukkit.Location loc)
    • updateLastSolidGround

      public void updateLastSolidGround(UUID playerId, org.bukkit.Location loc)
    • getGraveLogs

      public List<Map.Entry<UUID, org.bukkit.configuration.file.YamlConfiguration>> getGraveLogs(UUID ownerId)
    • getGraveLogIds

      public List<String> getGraveLogIds(UUID ownerId)
    • formatLoc

      public static String formatLoc(org.bukkit.Location loc)
    • dimensionName

      public static String dimensionName(org.bukkit.World world)
    • formatDuration

      public static String formatDuration(long millis)