Banner

Coding Programming PocketMine

Tutorial: How to Create a Plugin for PocketMine using Php

  1. Introduction
  2. Preparation
  3. Basic Plugin Structure
  4. Main Plugin
  5. Command Personalization
  6. Events and Listener
  7. Plugin Configuration
  8. Most Important Part
  9. Plugin Publication
  10. Additional Resources

Introduction

PocketMine-MP is server software for Minecraft: Bedrock Edition, downloaded in PHP. This tutorial walks you through creating a plugin for PocketMine 5.0.0 and later versions.

Preparation

Condition

PocketMine-MP installation

  1. Download the last version of PocketMine-MP from there Official Website.
  2. Follow the instructions to install PocketMine in your operating system.

Basic Plugin Structure

A PocketMine-MP plugin consisting of various archives, but the most important is plugin.yml, which describes the plugin, and a PHP archive containing p logic.

Carpet Structure

Primer Plugin

Archive plugin.yml

Archive Main.php

Command Personalization

To add personalized commands, you must specify them plugin.yml and create logic in PHP archive.

Modification plugin.yml

Modification Main.php

Events and Listener

These events allow the plugin to customize actions on the server.

Example: Events and Listener

Plugin Configuration

To allow plugin configuration, you can create an archive config.yml.

Archive config.yml

Modification Main.php

Most Important Part

Publishing plugins

Adding Resources

Join our Discord community and ask! Go to Discord