{"id":15144155,"url":"https://github.com/muqsit/deathinventorylog","last_synced_at":"2025-10-08T04:14:46.053Z","repository":{"id":37683953,"uuid":"346317424","full_name":"Muqsit/DeathInventoryLog","owner":"Muqsit","description":"A PocketMine-MP plugin that logs inventory contents of players right before their death","archived":false,"fork":false,"pushed_at":"2024-03-07T13:06:09.000Z","size":43,"stargazers_count":11,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T21:04:28.088Z","etag":null,"topics":["logging","plugin","pmmp","pmmp-plugin","pocketmine","pocketmine-mp"],"latest_commit_sha":null,"homepage":"https://poggit.pmmp.io/p/DeathInventoryLog","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Muqsit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-03-10T10:30:21.000Z","updated_at":"2024-12-18T22:16:07.000Z","dependencies_parsed_at":"2024-03-07T14:27:00.810Z","dependency_job_id":"0e2e9f56-1813-49e0-9ff7-50770a1c58ce","html_url":"https://github.com/Muqsit/DeathInventoryLog","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FDeathInventoryLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FDeathInventoryLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FDeathInventoryLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muqsit%2FDeathInventoryLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Muqsit","download_url":"https://codeload.github.com/Muqsit/DeathInventoryLog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237882172,"owners_count":19381176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logging","plugin","pmmp","pmmp-plugin","pocketmine","pocketmine-mp"],"created_at":"2024-09-26T10:22:07.081Z","updated_at":"2025-10-08T04:14:45.990Z","avatar_url":"https://github.com/Muqsit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeathInventoryLog\n[![](https://poggit.pmmp.io/shield.state/DeathInventoryLog)](https://poggit.pmmp.io/p/DeathInventoryLog)\n\nA plugin that logs players' inventory contents on death for future retrieval.\u003cbr\u003e\nHandy for server administrators who may want to refund items that players have lost to hackers, bugs, and the likes.\n\n## How it works?\nWhen a player dies, their inventory and armor inventory contents are logged and are assigned an ID.\nThe player's personal death inventory logs list can be accessed by running `/dil history \u003cplayer\u003e [page=1]`.\n```\n\u003e dil history BoxierChimera37\nDeath Entries Page 1\n1. #5 logged on 2021-10-15 02:43:20\n2. #2 logged on 2021-10-15 02:18:58\n3. #1 logged on 2021-10-15 02:17:36\n```\nThe number to right of number sign (`#`) is the ID of their death's inventory log.\nInventory and armor inventory contents linked to a player's specific death can be accessed by running `/dil retrieve \u003cid\u003e`\n```\n\u003e dil retrieve 5\nThis command can only be executed in-game.\n```\nThis command can be used only in-game because it opens an inventory GUI containing contents of the player's inventory during their time of death.\nItems can be added and removed from this inventory GUI, however the death inventory log per se is **unmodifyable**. When the log is retrieved again, you'll notice\nitems in the log inventory GUI laid out exactly the way they originally were, despite items being taken out of that inventory GUI.\n\n\n## Integrating with DeathInventoryLog\nFor plugins that would like to integrate with DeathInventoryLog to log manually handled player deaths,\nsuch as logging deaths from \"Combat Logger NPCs\", there isn't a sane method to do so _yet_ other than directly accessing the database\ninterface of this plugin in this way (PRs are welcome!):\n```php\n/** @var Loader $plugin */\n$plugin = $server-\u003egetPluginManager()-\u003egetPlugin(\"DeathInventoryLog\");\n\n/** @var Item[] $inventory */\t\t// = Living::getInventory()-\u003egetContents()\n/** @var Item[] $armor_inventory */\t// = Living::getArmorInventory()-\u003egetContents()\n/** @var UuidInterface $uuid */\t\t// = Player::getUniqueId()\n$plugin-\u003egetDatabase()-\u003estore($uuid, new DeathInventory($inventory, $armor_inventory), function(int $id) : void{\n\techo \"Logged death inventory, use '/dil history {$id}' to access this log\";\n});\n```\n\n\n## UUID to Gamertag (and vice-versa) Translation\nDeathInventoryLog stores players' death inventory logs indexed by their UUIDs.\nBy default, DeathInventoryLog maintains a UUID =\u003e Gamertag mapping in a local database (located at `plugin_data/DeathInventoryLog/uuid_gamertag_translations.sqlite`).\nThis mapping is used to translate player gamertag specified during `/dil history \u003cplayer\u003e` to a UUID. This UUID is then seached in the database containing all death inventory logs.\n\nIf you maintain a UUID \u003c-\u003e Gamertag mapping already and do not like how there's this another database being maintained by this plugin and causing data redundancy,\nand you also happen to have some knowledge in the field of programming plugins for PocketMine-MP, you can write your own `GamertagUUIDTranslator` implementation and set it to\nDeathInventoryLog in the following way:\n```php\n/** @var Loader $plugin */\n$plugin = $server-\u003egetPluginManager()-\u003egetPlugin(\"DeathInventoryLog\");\n\n/** @var GamertagUUIDTranslator $my_custom_translator */ \n$plugin-\u003esetTranslator($my_custom_translator);\n```\n`GamertagUUIDTranslator` is asynchronous-friendly, so you can translate between uuids and gamertags without necessarily blocking the main thread while at it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuqsit%2Fdeathinventorylog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuqsit%2Fdeathinventorylog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuqsit%2Fdeathinventorylog/lists"}