forked from ifera-mc/ScoreHud-Addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrisonEssentialsAddon.php
40 lines (35 loc) · 1.09 KB
/
PrisonEssentialsAddon.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
38
39
40
<?php
/**
* @name PrisonEssentialsAddon
* @version 1.0.0
* @main JackMD\ScoreHud\Addons\PrisonEssentialsAddon
* @depend PrisonEssentials
*/
namespace JackMD\ScoreHud\Addons
{
use JackMD\ScoreHud\addon\AddonBase;
use Prison\Main;
use Prison\EventListener;
use PrisonEssentials\Players;
use pocketmine\Player;
class PrisonEssentialsAddon extends AddonBase{
/** @var PrisonEssentials */
private $PrisonEssentials;
public function onEnable(): void{
$this->PrisonEssentials = $this->getServer()->getPluginManager()->getPlugin("PrisonEssentials");
}
/**
* @param Player $player
* @return array
*/
public function getProcessedTags(Player $player): array{
return [
"{prison_rank}" => $this->PrisonEssentials->getRank($player),
"{prison_nextrank}" => $this->PrisonEssentials->getNextRank($player),
"{price_to_rankup}" => $this->PrisonEssentials->calculateMoney($player),
"{prestige}" => $this->PrisonEssentials->getPrestige($player),
"{next_prestige}" => $this->PrisonEssentials->getNextPrestige($player),
];
}
}
}