From f3028065c3e76d59043d751d3bef9cbfc0b69684 Mon Sep 17 00:00:00 2001 From: AcNEO <37327658+AcNEO@users.noreply.github.com> Date: Mon, 19 Mar 2018 14:58:02 +0800 Subject: [PATCH] add new feature --- src/ARCore/ARCore.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/ARCore/ARCore.php b/src/ARCore/ARCore.php index 7cea53f..7e5eaf1 100644 --- a/src/ARCore/ARCore.php +++ b/src/ARCore/ARCore.php @@ -309,6 +309,15 @@ public function onEnable(){ "Player-Lose-Coins-PerDeath" => 10, "Player-Gains-Coins-For-Killing-Message" => "You Gains 20 Coins For Killed A Player.", "Player-Lose-Coins-For-Dying-Message" => "You Lose 10 Coins For Being Killed By A Player.", + "OnJoin" => [ + "EnableSendMessage" => true, + "howManyMessage" => 2, + "message" => [ + 0 => "First Message.", + 1 => "Second Message", + 2 => "Third Message", + ], + ], )); /////Start Of Clans [OnEnable]///// @@ -663,6 +672,15 @@ public function onJoiningPlayerSettings(PlayerJoinEvent $event){ $player->setLevel($worldlevel); $player->teleport(new Vector3($positionx, $positiony, $positionz, $worldlevel)); $player->setRotation(270, 0);//DAFUQ TO USE THIS??!! + if($this->custom->get("OnJoin.EnableSendMessage") == true){ + $i = $this->custom->get("OnJoin.howManyMessage"); // 0 // 2 //3 etc + for($ii = 0; $ii <= $i; $ii++){ + // example : OnJoin => message => $ii => "Message"; + // by AcNEO to MalakasPlazMC + $player->sendMessage($this->custom->get("OnJoin.message." . $ii)); + // now how many message is up to you. + } + } } /*TEST*/ public function disableBed(PlayerBedEnterEvent $event){