All Projects â†’ andresbytes â†’ NpcDialog

andresbytes / NpcDialog

Licence: LGPL-3.0 License
🗽 PocketMine-MP virion to add dialogs to entities easily

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to NpcDialog

Emotes
This plugin allows players to use their favorite emotes on the server!
Stars: ✭ 15 (-72.73%)
Mutual labels:  pocketmine, pmmp, pocketmine-plugin, pmmp-plugin
SkyBlock
🦅 SkyBlock for PocketMine-MP
Stars: ✭ 102 (+85.45%)
Mutual labels:  pmmp, pocketmine-plugin, pmmp-plugin
FormAPI-PMMP
Create a Form for Minecraft Bedrock in PocketMine-MP
Stars: ✭ 14 (-74.55%)
Mutual labels:  pocketmine, pocketmine-plugin, pmmp-plugin
BurgerCustomArmor
Create Custom Armor Sets with several abilities!
Stars: ✭ 25 (-54.55%)
Mutual labels:  pocketmine, pmmp, pmmp-plugin
VirionTools
A handy plugin for developers who wish to compile and inject virions without using Poggit.
Stars: ✭ 17 (-69.09%)
Mutual labels:  pocketmine, pmmp, virion
BurgerSpawners
Pocketmine Plugin implementing Stackable Spawners
Stars: ✭ 32 (-41.82%)
Mutual labels:  minecraft, pocketmine, pmmp
Pocketmine Mp
A server software for Minecraft: Bedrock Edition in PHP
Stars: ✭ 2,594 (+4616.36%)
Mutual labels:  minecraft, pocketmine, pmmp
BuilderTools
🪓 Powerful World Editor plugin for PocketMine servers
Stars: ✭ 74 (+34.55%)
Mutual labels:  pocketmine, pmmp, pocketmine-plugin
CosmeticMenu
Fun and Easy-to-Use Pocketmine Cosmetics plugin. (Gadgets, Particles, Trails, etc)
Stars: ✭ 22 (-60%)
Mutual labels:  pocketmine, pmmp, pmmp-plugin
SimpleMapRenderer
A PocketMine-MP Plugin that implements FilledMap
Stars: ✭ 25 (-54.55%)
Mutual labels:  pocketmine-plugin, pmmp-plugin
WarpUI
A warp UI and world UI teleportation plugin that supports rotation and pitch.
Stars: ✭ 14 (-74.55%)
Mutual labels:  pmmp, pmmp-plugin
AuctionHouse
Feature-packed auction house plugin for PocketMine-MP (pmmp)
Stars: ✭ 31 (-43.64%)
Mutual labels:  pocketmine, pmmp
MagicWE2
[MagicWE2] Lag free asynchronous world editor for PMMP with plenty of options
Stars: ✭ 109 (+98.18%)
Mutual labels:  pmmp, pmmp-plugin
MysteryBox
Crate implemention for PocketMine-MP (PMMP)
Stars: ✭ 19 (-65.45%)
Mutual labels:  pocketmine, pmmp
ProperDuels
A properly made duels plugin
Stars: ✭ 16 (-70.91%)
Mutual labels:  pocketmine, pocketmine-plugin
BlockSniper
An advanced (brush) world editing plugin for PocketMine-MP
Stars: ✭ 77 (+40%)
Mutual labels:  pocketmine, pmmp-plugin
PocketMine-Plugins
A bunch of PocketMine plugins that aren't useful enough for their own repo
Stars: ✭ 13 (-76.36%)
Mutual labels:  pocketmine-plugin, pmmp-plugin
InvSee
A PocketMine-MP plugin that lets you view and modify offline and online players' inventories in real-time!
Stars: ✭ 19 (-65.45%)
Mutual labels:  pocketmine, pmmp
CommandShop
Players have to pay items or money to use specific commands! A PocketMine plugin.
Stars: ✭ 32 (-41.82%)
Mutual labels:  pocketmine, pmmp
NPC
The NPC plugin for PocketMine-MP
Stars: ✭ 28 (-49.09%)
Mutual labels:  pmmp, pmmp-plugin

NpcDialog

Download

The compiled phar is available on poggit

How to use

First, you have to register the virion, you can do this during the onEnable() of your plugin main class.

public function onEnable(): void {
    NpcDialog::register($this);
}

Then you have to spawn or get the object of the entity you want to have the dialog form (it can't be a player!). For this example, I will spawn a zombie using PocketMine built-in methods.

$nbt = Entity::createBaseNBT($player, null, $player->yaw, $player->pitch);
$entity = Entity::createEntity("Zombie", $player->level, $nbt);
$entity->spawnToAll();

$entity->setNameTag("Jerry The Zombie!");

Finally you will have to create the form and pair it with the entity.

$form = new DialogForm("This is the dialog text");
 
$form->addButton(new Button("Hi", function(Player $player) {
    $player->sendMessage("Hi!!");
}));

$form->setCloseListener(function(Player $player) {
    $player->sendMessage("You closed the form!");
});

$form->pairWithEntity($entity);

The result of this example would be an entity showing this when it's right-clicked (or hold in the mobile versions):

Example

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].