-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.php
More file actions
29 lines (26 loc) · 1003 Bytes
/
Main.php
File metadata and controls
29 lines (26 loc) · 1003 Bytes
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
<?php
namespace MineJonas\Heal;
use pocketmine\command/CommandSender;
use pocketmine\plugin\PluginBase;
use pocketmine\command\Command;
use pocketmine\Server;
use pocketmine\Server;
use pocketmine\utils\TextFormat as c;
class Main extends PluginBase {
public function onEnable(){
$this->getLogger()->notice(c::BOLD.c::DARK_PURPLE."(!)",c::RESET.c::DARK_AQUA."Plugin aktiviert.");
}
public function onCommand(CommonSender $sender, Command $cmd, $label, array $args){
if (strtlower($cmd->getName()) == "Heal"){
if ($sender->hasPermission("Heal")){
$sender->sendMessage(c::BOLD.c::DARK_PURPLE."(!)".c::DARK_AQUA."Du wurdest erfolgreich gehealt.");
$sender->setHealth(20.0);
}elseIf(!$sender->hasPermission("Heal")){
$sender->sendMessage(c:BOLD.c::DARK_RED."(!)".c::RESET.c::RED." Dir fehlt die Heal Permission.");
}
}
)
public function onDisable(){
$this->getLogger()->warning(c::BOLD.c::DARK_RED."(!)".c::RESET.c::RED." Plugin deaktiviert.");
}
}