Merge branch '4.0' of Point808/PMMP_Plugins into master
This commit is contained in:
commit
564521ac9f
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
PMMP plugin to email admins on some server events
|
PMMP plugin to email admins on some server events
|
||||||
|
|
||||||
Tested on 3.0.0-ALPHA5.
|
Tested on 3.0.0 and 4.0.0.
|
||||||
|
|
||||||
Edit config.yml with the address to send to. Your server will need to be set up to send email properly via php.
|
Edit config.yml with the address to send to. Your server will need to be set up to send email properly via php.
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ namespace AdminMail;
|
|||||||
|
|
||||||
use pocketmine\scheduler\Task;
|
use pocketmine\scheduler\Task;
|
||||||
use pocketmine\Player;
|
use pocketmine\Player;
|
||||||
use pocketmine\event\player\PlayerJoinEvent;
|
use pocketmine\event\player\PlayerLoginEvent;
|
||||||
use pocketmine\plugin\PluginBase;
|
use pocketmine\plugin\PluginBase;
|
||||||
use pocketmine\event\Listener;
|
use pocketmine\event\Listener;
|
||||||
use pocketmine\command\Command;
|
use pocketmine\command\Command;
|
||||||
@ -22,8 +22,7 @@ class EmailTask extends Task {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onRun(int $currentTick) {
|
public function onRun(int $currentTick) {
|
||||||
$player = $this->getOwner()->getServer()->getPlayer($this->playername);
|
$name = $this->playername;
|
||||||
$name = $player->getName();
|
|
||||||
$admin = $this->adminmail;
|
$admin = $this->adminmail;
|
||||||
$admin1 = $this->adminsubject;
|
$admin1 = $this->adminsubject;
|
||||||
$admin1 = str_replace("PNAME", $name, $admin1);
|
$admin1 = str_replace("PNAME", $name, $admin1);
|
||||||
|
Loading…
Reference in New Issue
Block a user