xqwtxon / SubMotd-TestPlugin

TestPlugin for Sub-MOTD Support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is this?

This is plugin is target to test the Sub-Motd Support for PocketMine-MP.
This is on-going to be test in the future, if this repository was archived, that means it was approved to the PocketMine-MP Original Repository.

What is Sub-MOTD?

Custom Sub-MOTD Support as on Custom MOTD in the config. This changes the interface query of the server. The "My World" will change as on server.properties provided sub-motd. We can say its useless but if we add this feature we can say people will not going to make their own pocketmine-mp for changing VersionInfo.php the name. So we can use function Network->setName(); & Network->setLanName() if value is missing it will returning VersionInfo::NAME as default. People wont make their own useless Pocketmine-MP Forks to implement this feature.

Changes

API

Network->setName("MOTD");
Network->setLanName("MOTD");

Behaivor Changes

Backwards Compability

$this->getServer()->getNetwork()->setName("MOTD");
$this->getServer()->getNetwork()->setLanName("MOTD");

$this->getServer()->getMotd();
$this->getServer()->getLanMotd();

$this->getServer()->getNetwork()->getName();
$this->getServer()->getNetwork()->getLanName();

$this->getServer()->getQueryInformation()->getLanServerName();
$this->getServer()->getQueryInformation()->setLanServerName("MOTD");

Tests

Test the server and run with example plugin test for this feature.

For Plugin Developers

Do not use Network->internalSetName(), this kindly mostly bug on PocketMine-MP RakLib, The Query is displaying the ipv4/ipv6. It break backwards compability and behaivor of the game. Take a example how developers can do with it.

For Internal Developers

Please help me to fix this internalSetName() to protect these agains the BC Break.

About

TestPlugin for Sub-MOTD Support


Languages

Language:PHP 100.0%