{"id":15018679,"url":"https://github.com/tedo0627/inventoryui","last_synced_at":"2025-04-10T01:16:02.074Z","repository":{"id":128969975,"uuid":"498362859","full_name":"tedo0627/InventoryUI","owner":"tedo0627","description":"This is the PocketMine virion that implements the dummy inventory.","archived":false,"fork":false,"pushed_at":"2024-10-29T11:20:48.000Z","size":39,"stargazers_count":33,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T01:15:57.126Z","etag":null,"topics":["inventory","pmmp","pocketmine","pocketmine-mp","ui","virion"],"latest_commit_sha":null,"homepage":"","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/tedo0627.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,"publiccode":null,"codemeta":null}},"created_at":"2022-05-31T14:07:42.000Z","updated_at":"2025-02-24T23:10:35.000Z","dependencies_parsed_at":"2023-09-24T06:32:50.439Z","dependency_job_id":"0b4f181b-f9cd-47d3-9677-721ccdbd257e","html_url":"https://github.com/tedo0627/InventoryUI","commit_stats":{"total_commits":32,"total_committers":7,"mean_commits":4.571428571428571,"dds":0.28125,"last_synced_commit":"2dece1f22c060ad907b57cca54e7d4a59bc68663"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedo0627%2FInventoryUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedo0627%2FInventoryUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedo0627%2FInventoryUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tedo0627%2FInventoryUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tedo0627","download_url":"https://codeload.github.com/tedo0627/InventoryUI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137891,"owners_count":21053775,"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":["inventory","pmmp","pocketmine","pocketmine-mp","ui","virion"],"created_at":"2024-09-24T19:52:16.450Z","updated_at":"2025-04-10T01:16:02.048Z","avatar_url":"https://github.com/tedo0627.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InventoryUI\nThis is the PocketMine virion that implements the dummy inventory.\n\n## Differences from previous APIs\n* Chests and other blocks are not placed.\n* If a player falls or moves by water or other means when the inventory is open, the inventory will not close.\n* You can specify any number of slots in your inventory. (Up to 1000 confirmed)\n* Vertical length of inventory slots can be specified. (max. 6)\n\n## Demo\nhttps://github.com/tedo0627/InventoryUI/assets/24734045/3a0f3c90-2c02-4e1e-b9fd-69a868dbfbad\n\n## How to install\n1. Download [InventoryUIResourcePack.mcpack](https://github.com/tedo0627/InventoryUIResourcePack/releases/) and put it in the resource_packs folder\n2. Open file ```resource_packs.yml```, set **force_resources** to ```true``` and **resource_stack** to ```InventoryUIResourcePack.mcpack```\n```yml\nforce_resources: true\nresource_stack:\n  - InventoryUIResourcePack.mcpack\n```\n\n## Usage\nThe following code must be called when the plugin is enabled.\n```php\nInventoryUI::setup($this);\n```\n### Open custom inventory\n```$slot``` specifies the number of slots in the inventory and must be a number greater than zero.  \n```$title``` is the name of the inventory.  \n```$length``` is entered as the vertical length of the inventory. If null, it is automatically adjusted.\n```php\n/** @var Player $player */\n$player-\u003esetCurrentWindow(new CustomInventory($slot, $title, $length));\n```\n\n### Extend custom inventory\n```php\nclass SampleInventory extends CustomInventory {\n\n    public function __construct() {\n        parent::__construct(54, \"Sample Inventory\");\n    }\n\n    public function open(Player $player): void {\n        // Called when a player opens this inventory.\n    }\n\n    public function tick(int $tick): void {\n        // Called every tick when someone opens inventory.\n    }\n\n    public function click(Player $player, int $slot, Item $sourceItem, Item $targetItem): bool {\n        // It is called when a slot in the inventory is operated.\n        // If the return value is true, the operation is canceled.\n        return false;\n    }\n\n    public function close(Player $player): void {\n        // Called when the player closes the inventory.\n    }\n}\n```\n\nSample plugin [here](https://github.com/tedo0627/SampleInventoryUI)\n\n## License\n\"InventoryUI\" is under [MIT License](https://github.com/tedo0627/InventoryUI/blob/master/LICENSE)\n\n## Special Thanks\nHelp resource pack [@yuyaprgrm](https://github.com/yuyaprgrm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedo0627%2Finventoryui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftedo0627%2Finventoryui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftedo0627%2Finventoryui/lists"}