InventoryLib: PocketMine-MP APIv4.0.0

Overview

InventoryLib

PocketMine-MP APIv4.0.0

How to use

This description does not describe all features. You can contribute for pullrequest


register InvLibManager during plugin enable

InvLibManager::register($this);

InvInfo

$position's type is pocketmine\world\Position

$type list

  • InvInfo::TYPE_CHEST
  • InvInfo::TYPE_DOUBLE_CHEST
  • invInfo::TYPE_DROPPER
  • invInfo::TYPE_HOPPER
$info = new InvInfo($type, $position, 'test');

Create custom inventory class

class TestInv extends LibInventory{
	public function __construct(InvInfo $info){
		parent::__construct($info);
	}
	//code
	
	protected function onTransaction(InvLibAction $action) :void{
		if($action->getInput()->getId() === 1){
			$action->setCancel();
		}
	}
	
}

SendInventory

$inv = new TestInv($info);
$inv->send($player, function () use ($inv){
	$inv->setItem(3, ItemFactory::getInstance()->get(1));
});
You might also like...
Creates a WorldBorder for PocketMine-MP servers!
Creates a WorldBorder for PocketMine-MP servers!

This plugin is not yet ready for Poggit or download It is going through mass changes over the next few days Message my Discord to recieve an older eli

Custom boss plugin for PocketMine-MP.

Bosses Custom boss plugin for PocketMine-MP. What is this plugin? This plugin adds entities that they have so much things to configure! How to create

A Pocketmine Plug-in For Executing Commands While You Click on a item

ItemInteract What This Plugin Do? well This Plugin Is Usefull For Some Servers Like minigames,Skyblock,Lobby etc. This plugin can execute commands whi

This plugin adds custom pets to game for PocketMine-MP!
This plugin adds custom pets to game for PocketMine-MP!

ComplexPets A plugin that adds pets to game made by OguzhanUmutlu for PocketMine-MP. Command Simply type /pets and summon your favorite animal! Featur

Casino plugin for Pocketmine-MP

Casino A simple Casino plugin for Pocketmine-MP. Usage You can make people bet for in-game money and in return either they win the money or loose. Cha

Spawns system for PocketMine-MP

[] SimpleSpawns | v1.0.0 Spawns system for PocketMine-MP, written in PHP-7.4 and only supports PocketMine-MP 3.0.0 ⚡ Features: Put the spawn zone wher

Block Hunt minigame for PocketMine-MP!

BlockHunt Block Hunt minigame for PocketMine-MP! What is this minigame? In this minigame there are two teams, Hunters and seekers. Seekers are trying

Perfect Anti Kill Aura for PocketMine-MP!

AntiAuraBot Perfect Anti Kill Aura for PocketMine-MP! What it does? It punishes kill aura hackers with bot! TODO idk. Discord: Oğuzhan#6561 for sugges

🐕‍🦺 An Ultimate Pets plugin for PocketMine-MP.
🐕‍🦺 An Ultimate Pets plugin for PocketMine-MP.

SimplePets An Ultimate Pets plugin made by broki for PocketMine-MP. ✨ Features MySQL and SQLite database Anti sql injection All mobs in Minecraft Pets

Comments
  • Update

    Update

    DoubleChestInventory 클래스에 public function setReady() 함수 추가 하여 앞으로 인벤토리 클래스를 만들따 딜레이 테스크를 생성하여 setItem()을 할필요 없습니다. OneBlockInventory 클래스 만들때 필요한 변수를 줄였습니다.

    opened by sky-min 0
Owner
HI!
null
A PocketMine/Altay Plugin to morph yourself into a block

BlockMorph A PocketMine/Altay Plugin to morph yourself into a block Command To morph yourself into a block use this command: /blockmorph [BlockID|Bloc

Matze 7 Mar 22, 2022
A useful PocketMine-MP plugin that allows you to create crates in-game!

ComplexCrates A useful PocketMine-MP plugin that allows you to create crates in-game! Commands Main command: /crate Sub commands: create

Oğuzhan 8 Aug 26, 2021
A plugin to add more blocks to PocketMine

This plugin aims to add all blocks not included in PocketMine. As of right now the ExtendedBlocks plugin is required to add blocks with IDs above 255.

xSuper 26 Dec 19, 2022
This Pocketmine-MP plugin is a plugin including a complete faction system.

SimpleFaction Simple faction plugin replacing FactionsPro which is no longer updated. Commands Command Name Command Description Available for /f help

Ayzrix 33 Dec 19, 2022
✨An Ultimate NPC plugin made by brokiem for PocketMine-MP.

SimpleNPC An Ultimate NPC plugin made by brokiem for PocketMine-MP. ✨ Features Migration from Slapper supported! ✔ Right click to interact! ✔ NPC can

broki 53 Jan 1, 2023
Plot and protection plugin for PocketMine-MP

MyPlot Create, manage, and build in protected plots. Keep your builds safe from griefers! Official MyPlot precompiled builds can be found on Poggit at

Jason 101 Oct 28, 2022
A Pocketmine-MP (PMMP) plugin to help staff members enforce the rules of the server.

StaffMode is an all-in-one Pocketmine-MP (PMMP) moderation plugin made to simplify the life of staff members.

ItsMax123 9 Sep 17, 2022
A Pocketmine-MP (PMMP) plugin to prevent players from doing most glitches.

AntiGlitch AntiGlitch is an all-in-one Pocketmine-MP (PMMP) plugin made to prevent as many known glitches. Setup Guide To start using the plugin, down

ItsMax123 12 Sep 17, 2022
CrateKeyShopGUI Pocketmine-MP plugin which can be set in Config.yml file

CrateKeyShopGUI CrateKeyShopGUI Pocketmine-MP plugin which can be set in Config.yml file Depend FormAPI EconomyAPI PiggyCrate InvCrashFix Download Dow

null 4 Jan 7, 2022
An amazing Rank and Permissions Manager. The best ranks manager for PocketMine-MP.

?? RankSystem ?? An amazing Rank and Permissions Manager Description: An amazing Rank and Permissions Manager. The best ranks manager for PocketMine-M

null 22 Nov 7, 2022