HungerGames-UPDATED icon indicating copy to clipboard operation
HungerGames-UPDATED copied to clipboard

Support for Plugin

Open Alemiz112 opened this issue 6 years ago • 3 comments

Hi, I made pocketmine plugin called SlivockyStats! I want to ask If you can add some code to support my rating system and Ranks ?

https://github.com/Alemiz112/SlivockyStats

Thanks

Alemiz112 avatar Apr 03 '19 16:04 Alemiz112

interesting. how would i do that?

xBeastMode avatar Apr 04 '19 02:04 xBeastMode

If someone die, kill someone, won it will save that datas to config. You will make simple function whitch I will be able to call from my plugin, like:

$data = $this->plugin->getServer()->getPluginManager()->getPlugin('HungerGames')->getData(0);

It must be returned as array to make me able to create Stats:

arsort($data); foreach ($data as $name => $kills) {}

You can find more here: My HungerGames

You can too add there option to XP Ranks: $ranks = $this->plugin->getServer()->getPluginManager()->getPlugin("SlivockyStats"); if ($ranks !== null){ $ranks->provider->addXP($killer, 2); }

Alemiz112 avatar Apr 04 '19 05:04 Alemiz112

Artulloss why that ?

Alemiz112 avatar Apr 04 '19 12:04 Alemiz112