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

Overview

ItemInteract

Icon

What This Plugin Do?

Discord Poggit-Ci

well This Plugin Is Usefull For Some Servers Like minigames,Skyblock,Lobby etc. This plugin can execute commands while you click on that item in your inventory Example You Can able To Open a FormUI with command when you click on that item I Recommend You To Use Item Ids not blocks. In config

Features

  • ItemID can be configured in config.
  • HotBarSlots are Customisable In Config.
  • Custom ItemNames are customisable In Config.
  • Commands are Customisable In Config.
  • Lore Can be Customisable in config! (Todo)

Pull Request

If You Like To Construibite To This Plugin Feel free to make pull request!

NOTE

You Can Only Able to Set HotBarSlot 0 to 9 in Config! If you have any issues pls create a issue on github repo.

You might also like...
UMySQL is an extremely simple PHP library for communicating with MySQL databases with ease while keeping overhead to a bare minimum.

Uncomplicated MySQL UMySQL is an extremely simple PHP library for communicating with MySQL databases with ease while keeping overhead to a bare minimu

A custom twig extension to truncate text while preserving HTML tags.

TwigTruncateExtension A custom twig extension to truncate text while preserving HTML tags. Installation Add the library to your app's composer.json:

This is a PocketMine plugin that helps staffs track players using commands.
This is a PocketMine plugin that helps staffs track players using commands.

Track This is a PocketMine plugin that helps staffs track players using commands. Features Allows selected staffs to watch players use commands to fac

Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.
Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.

Dispatcher Dispatcher allows you to schedule your artisan commands within your Laravel project, eliminating the need to touch the crontab when deployi

A Laravel 9 package that allows you enforce security of your artisan commands by authenticating users before running.

Introduction This package allows you as a developer to restrict who can and cannot run artisan commands, especially in a production environment. For e

A plugin that allows you to hear the sound "Welcome to the server!" when you join the server by NhanAZ for PocketMine-MP

General A plugin that allows you to hear the sound "Welcome to the server!" when you join the server by NhanAZ for PocketMine-MP Contacts You can cont

A plugin manager for PocketMine-MP downloads plugin from PocketMine-MP official plugin repository

oh-my-pmmp A plugin manager for PocketMine-MP Getting Started Prerequisites Your server MUST RUN the latest version of PocketMine. Installation From P

🌏 Webnux 🌏 , a videos streaming website where you can watch what you want when you want.
🌏 Webnux 🌏 , a videos streaming website where you can watch what you want when you want.

🎥 WEBNUX 🎥 Welcome to 🌏 Webnux 🌏 , a videos streaming website where you can watch what you want when you want. ☀️ ☀️ OBJECTIFS ☀️ ☀️ - A sessi

Comments
  • PM4 one more for working

    PM4 one more for working

    getServer()->getPluginManager()->registerEvents($this, $this); $this->saveDefaultConfig(); } public function onJoin(PlayerJoinEvent $event): void { $player = $event->getPlayer(); $itemArray = explode(':', $this->getConfig()->get("ItemID")); if(!isset($itemArray[0]) || !isset($itemArray[1]) || !isset($itemArray[2])) { $this->getLogger()->error("Config Error! Make Sure To Use ID:META:COUNT."); return; } $item = ItemFactory::getInstance()->get((int)$itemArray[0], (int)$itemArray[1], (int)$itemArray[2]); //FORMAT ID:META:COUNT $player = $event->getPlayer(); $item->setCustomName("§r".$this->getConfig()->get("DisplayName")); $item->getNamedTag()->setInt("ItemInteractPlugin", 1); $player->getInventory()->setItem($this->getConfig()->get("HotBarSlot"), $item, true); } public function onDrop(PlayerDropItemEvent $event): void { $transaction = $event->getTargetItem(); foreach ($transaction->getActions() as $action) { if($action->getSourceItem()->getNamedTag()->getTag("ItemInteractPlugin")) $event->cancel(); } } public function onClick(PlayerInteractEvent $event): void { $player = $event->getPlayer(); $item = $player->getInventory()->getItemInHand(); if($item->getNamedTag()->getTag("ItemInteractPlugin")) $this->getServer()->getCommandMap()->dispatch($player, $this->getConfig()->get("command")); } public function onTransaction(InventoryTransactionEvent $event): void { $transaction = $event->getTargetItem(); foreach ($transaction->getTransactions() as $action) { if($action->getSourceItem()->getNamedTag()->getTag("ItemInteractPlugin")) $event->cancel(); } } public function onRespawn(PlayerRespawnEvent $event): void { if($this->getConfig()->get("item-on-respawn") == true){ $player = $event->getPlayer(); $itemArray = explode(':', $this->getConfig()->get("ItemID")); if(!isset($itemArray[0]) || !isset($itemArray[1]) || !isset($itemArray[2])) { $this->getLogger()->error("Config Error! Make Sure To Use ID:META:COUNT."); return; } $player = $event->getPlayer(); $item = ItemFactory::getInstance()->get((int)$itemArray[0], (int)$itemArray[1], (int)$itemArray[2]); //FORMAT ID:META:COUNT $item->setCustomName("§r".$this->getConfig()->get("DisplayName")); $item->getNamedTag()->setInt("ItemInteractPlugin", 1); $player->getInventory()->setItem($this->getConfig()->get("HotBarSlot"), $item, true); } } } On drop items of inventory /** **All is working, just drop items on ground make crash, please help to update** Error: Call to undefined method pocketmine\event\player\PlayerDropItemEvent::getTransaction() File: plugins/ItemInteract_v1.0.0/src/MrNinja008/ItemInteract/Main Line: 41 public function onDrop(PlayerDropItemEvent $event): void { $transaction = $event->getTransactions(); foreach ($transaction->getActions() as $action) { if($action->getSourceItem()->getNamedTag()->getTag("ItemInteractPlugin")) $event->cancel(); } } */
    opened by xodamcm 2
Releases(v2.0.0)
Owner
Welkum to my gathub lats play! :d
null
Plug-and-Play Custom Enchants Plugin For PocketMine-PMP

DEVELOPER'S NOTE: I can tell you right now this plugin hasn't been tested. I haven't even checked to see if it loads without crashing yet. Half of thi

VANIC 10 Oct 23, 2021
A plugin that helps you to edit item's NBT in-game

NBTEditor A plugin that helps you to edit item's NBT in-game Usage: Join your server and enter command /nbteditor (or /nbte). The editor will be displ

null 4 Dec 7, 2022
Simple Plugin to Light Redstone Lamps with one click for PocketMine-MP API 4.

TouchLight-PM4 Simple plugin to light redstone lamps with one click! Category PocketMine-MP plugins | PHP 8 Requirements PocketMine-MP API 4.0.0 and P

HenryDM 4 Aug 20, 2022
A Zabbix module to show groups/hosts as a tree under Monitoring -> Hosts Tree menu item

zabbix-module-hosts-tree Written according to Zabbix official documentation https://www.zabbix.com/documentation/current/manual/modules A Zabbix modul

BGmot 16 Dec 6, 2022
A virtual machine for executing programs written in Hack.

HHVM HHVM page | HHVM documentation | Hacklang page | General group | Dev group | Twitter HHVM is an open-source virtual machine designed for executin

Meta 17.5k Dec 30, 2022
Shelly Plug Prometheus exporter.

Shelly Plug Prometheus Exporter I am a simple man. I have a Shelly Plug. I don't want to flash a different firmware on it just to get a Prometheus end

Jeff Geerling 38 Dec 6, 2022
The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. All commands are extendable by a module API.

netz98 magerun CLI tools for Magento 2 The n98 magerun cli tools provides some handy tools to work with Magento from command line. Build Status Latest

netz98 758 Dec 28, 2022
A Magento 2 module that allows for creating discrete PDP (Product Detail Pages) page layouts for customers landing on the site from a PPC (Pay Per Click) link/ad by allowing routing to the same pages using a `/ppc/` prefix in the URL path.

A Magento 2 module that allows for creating discrete PDP (Product Detail Pages) page layouts for customers landing on the site from a PPC (Pay Per Click) link/ad by allowing routing to the same pages using a `/ppc/` prefix in the URL path.

null 16 Nov 11, 2022
Allow players to see how well they are doing while pvping with the help of a combo counter

Combo-Counter Allow players to see how well they are doing while pvping with the help of a combo counter Settngs / Config #set to false if you dont wa

null 3 Jun 1, 2022
This plugin gets player time while playing and leaderboard

TopNolep TopNolep is a plugin that retrieves the game time the player was on the server during, not only that, topnolep now provides a leaderboard tha

Edo 5 Oct 22, 2021