Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

YassLV/DynoPM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DynoPM

Implementing Dyno for PocketMine-MP

Description

Create a Network system for PocketMine easily without AsyncTask and MySQL !

Version

  • DynoPM Version: 1.0
  • For PocketMine-MP: 3.0.0
  • Current Protocol: 1
  • Config Version: 1.0

Where can i get latest .phar?

Download latest .phar here: Github Release

Installation

DynoPM needs Dyno to work

Download latest .phar and moved it to the PocketMine plugins folder

Plugin Example

Documentation

Documentation Page: Wiki

Code Example

You can see more example code on the documentation!

Connection to Dyno

public function onEnable()
{
    DynoPM::getInstance()->addPluginSyncWithDynoDescription($this, $dynoDesc);
    if (($this->dyno = DynoPM::getInstance()->getDynoByDescription($dynoDesc)) === null) {
         $this->getServer()->getPluginManager()->disablePlugin($this);
         return;
    }
    $this->getServer()->getLogger()->info("Plugin Started !");
}

Creation Base and Table and Put Keys

$pk = new inputPacket();
$final = new inputPacketLib();
$final = $final
    ->createBase("Base Test", [
       BaseOptionsInterface::ONLY_IF_BASE_NOT_EXIST
    ])
    ->createTable("Table Test", [
       TableOptionsInterface::ONLY_IF_TABLE_NOT_EXIST
    ])
    ->getTable("Table Test")
    ->putBool("Bool !", true)
    ->putString("String !", "This is a string")
    ->finalInput();
$pk->input = $final;
$this->dyno->sendDataPacket($pk);

Configuration

Plugin

Configuration in config.yml

enabled: Enable DynoPM plugin or not

dynos:
   - enabled: Enabled Dyno Client
   ip: IP Dyno
   port: Port Dyno
   description: Description of your dyno (Allows to identify the DynoPM)
   password: Dyno Password

Frequently Asked Questions

What plugins can I create with DynoPM?

With DynoPM you can create any kind of plugin using MySQL/YML, there is no limitation .

Why use Dyno instead of MySQL for PocketMine?

You do not have to use only dyno, you can use Mysql and Dyno. Dyno even has a function that automatically transfers the data sent to Dyno on Mysql and guarantees no lag on your PocketMine server.

How does Dyno not create Lags?

This means that you can send multiple Information Packet per second without having to wait more than 2 seconds for an Asynchronous response.

Developing with Dyno is easy?

You can look at the source of the example plugins.