Class GraveManager
java.lang.Object
com.haven.havenplugin.graves.GraveManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidautoCollect(org.bukkit.entity.Player player, Grave grave) booleanbooleancreateGrave(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack[] items, int totalXp, String deathCause, long timeSinceLastDeath) static StringdimensionName(org.bukkit.World world) voiddropGraveContents(Grave grave, org.bukkit.Location loc) static StringformatDuration(long millis) static StringformatLoc(org.bukkit.Location loc) getGraveAt(org.bukkit.Location loc) getGraveById(UUID id) getGraveLogIds(UUID ownerId) getGraveLogs(UUID ownerId) getPlayerGrave(UUID playerId, int number) getPlayerGraves(UUID playerId) booleanisGraveBlock(org.bukkit.Location loc) booleanisWorldAllowed(org.bukkit.World world) voidvoidnotifyGraveBroken(Grave grave, org.bukkit.entity.Player breaker) voidnotifyOwnerLooted(Grave grave, org.bukkit.entity.Player looter, boolean fully) voidopenGraveInventory(org.bukkit.entity.Player viewer, Grave grave, boolean readOnly) voidvoidvoidremoveGrave(UUID graveId, boolean dropItems, GraveRemoveReason reason) booleanrestoreGrave(org.bukkit.command.CommandSender sender, UUID ownerId, String ownerName, UUID graveId) Restores a grave from its log file.voidbooleansetGraveLocked(UUID graveId, boolean locked) voidsetInventoryManager(GraveInventoryManager invManager) Must be called beforeloadGraves()orstartCleanupTask().voidvoidvoidsyncInventoryToGrave(UUID graveId, org.bukkit.inventory.Inventory inv) voidupdateLastSolidGround(UUID playerId, org.bukkit.Location loc)
-
Constructor Details
-
GraveManager
-
-
Method Details
-
setInventoryManager
Must be called beforeloadGraves()orstartCleanupTask(). -
reloadConfig
public void reloadConfig() -
isWorldAllowed
public boolean isWorldAllowed(org.bukkit.World world) -
openGraveInventory
-
autoCollect
-
syncInventoryToGrave
-
dropGraveContents
-
createGrave
public boolean createGrave(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack[] items, int totalXp, String deathCause, long timeSinceLastDeath) -
removeGrave
-
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
-
setGraveLocked
-
notifyOwnerLooted
-
notifyGraveBroken
-
removeAllDisplays
public void removeAllDisplays() -
loadGraves
public void loadGraves() -
saveGraves
public void saveGraves() -
startCleanupTask
public void startCleanupTask() -
stopCleanupTask
public void stopCleanupTask() -
getGraveAt
-
getGraveById
-
getPlayerGraves
-
getPlayerGrave
-
isGraveBlock
public boolean isGraveBlock(org.bukkit.Location loc) -
updateLastSolidGround
-
getGraveLogs
-
getGraveLogIds
-
formatLoc
-
dimensionName
-
formatDuration
-