forked from ifera-mc/ScoreHud-Addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRedSkyBlockAddon.php
37 lines (30 loc) · 1.15 KB
/
RedSkyBlockAddon.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* @name RedSkyBlockAddon
* @version 1.0.0
* @main JackMD\ScoreHud\Addons\RedSkyBlockAddon
* @depend RedSkyBlock
* @api 3.0.0
*/
namespace JackMD\ScoreHud\Addons {
use JackMD\ScoreHud\addon\AddonBase;
use RedCraftPE\RedSkyBlock\SkyBlock;
use pocketmine\Player;
class RedSkyBlockAddon extends AddonBase {
private $redSkyBlockAPI;
public function onEnable(): void {
$this->redSkyBlockAPI = $this->getServer()->getPluginManager()->getPlugin("RedSkyBlock");
}
public function getProcessedTags(Player $player): array {
return [
"{island_name}" => $this->redSkyBlockAPI->getIslandName($player),
"{island_members}" => $this->redSkyBlockAPI->getMembers($player),
"{island_banned}" => $this->redSkyBlockAPI->getBanned($player),
"{island_locked_status}" => $this->redSkyBlockAPI->getLockedStatus($player),
"{island_size}" => $this->redSkyBlockAPI->getSize($player),
"{island_rank}" => $this->redSkyBlockAPI->calcRank(strtolower($player->getName())),
"{island_value}" => $this->redSkyBlockAPI->getValue($player)
];
}
}
}