
<?php
echo "PocketMine-MP plugin RegularlyMessage v1.0.5
This file has been generated using DevTools v1.13.0 at Wed, 20 Feb 2019 14:10:07 +0900
----------------
";

if(extension_loaded("phar")){
	$phar = new \Phar(__FILE__);
	foreach($phar->getMetadata() as $key => $value){
		echo ucfirst($key) . ": " . (is_array($value) ? implode(", ", $value) : $value) . "\n";
	}
}

__HALT_COMPILER(); ?>
;             =  a:9:{s:4:"name";s:16:"RegularlyMessage";s:7:"version";s:5:"1.0.5";s:4:"main";s:21:"regularlymessage\Main";s:3:"api";a:1:{i:0;s:5:"3.0.0";}s:6:"depend";s:0:"";s:11:"description";s:28:"Send your messages regularly";s:7:"authors";s:0:"";s:7:"website";s:27:"https://github.com/bboyyu51";s:12:"creationDate";i:1550639407;}   src/regularlymessage/Main.php  /l\  CE      %   src/regularlymessage/CallbackTask.php  /l\  6Ӄ      	   README.mdl   /l\l   v+z      
   plugin.yml   /l\   ?D)         LICENSE.txtM  /l\M  
js      <?php

namespace regularlymessage;

use pocketmine\plugin\PluginBase;
use pocketmine\Player;
use pocketmine\scheduler\Task;
use pocketmine\utils\Utils;
use pocketmine\utils\Config;

class main extends PluginBase{
	public function onEnable(){
		$this->getLogger()->info("§aこのプラグインはMITライセンスにより配布されています");
		$this->config = new Config($this->getDataFolder() . "config.yml", Config::YAML,[
			'RepeatSeconds' => 90,
			'Number of messages' => 5,
			'1' => 'message1',
			'2' => 'message2',
			'3' => 'message3',
			'4' => 'message4',
			'5' => 'message5',
		]);

		$sec = $this->config->get("RepeatSeconds");
		$sec = $sec * 20;
		$this->getScheduler()->scheduleRepeatingTask(new CallbackTask([$this,"SendTask"]), $sec);
	}

	public function SendTask(){
		$message_num = $this->config->get("Number of messages");
		$rand = mt_rand(1, $message_num);
		$message = $this->config->get($rand);
		$this->getServer()->broadcastMessage("§a[定期]§b".$message);
	}
}<?php

/*
 *
 *  ____            _        _   __  __ _                  __  __ ____
 * |  _ \ ___   ___| | _____| |_|  \/  (_)_ __   ___      |  \/  |  _ \
 * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
 * |  __/ (_) | (__|   <  __/ |_| |  | | | | | |  __/_____| |  | |  __/
 * |_|   \___/ \___|_|\_\___|\__|_|  |_|_|_| |_|\___|     |_|  |_|_|
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * @author PocketMine Team
 * @link http://www.pocketmine.net/
 *
 *
*/

namespace regularlymessage;

use pocketmine\scheduler\Task;

/**
 * Allows the creation of simple callbacks with extra data
 * The last parameter in the callback will be this object
 *
 * If you want to do a task in a Plugin, consider extending PluginTask to your needs
 *
 * @deprecated
 * Do NOT use this anymore, it was deprecated a long time ago at PocketMine
 * and will be removed at some stage in the future.
 */

class CallbackTask extends Task {

	/** @var callable */
	protected $callable;

	/** @var array */
	protected $args;

	/**
	 * @param callable $callable
	 * @param array    $args
	 */
	public function __construct(callable $callable, array $args = []){
		$this->callable = $callable;
		$this->args = $args;
		$this->args[] = $this;
	}

	/**
	 * @return callable
	 */
	public function getCallable(){
		return $this->callable;
	}

	/**
	 * @param $currentTicks
	 */
	public function onRun($currentTicks){
		call_user_func_array($this->callable, $this->args);
	}

}# RegularlyMessage
PocketMine-MPのプラグインです。定期的にメッセージを送信します。
name: RegularlyMessage
api: [3.0.0]
main: regularlymessage\Main
version: 1.0.5
description: Send your messages regularly
author: bboyyu51
website: https://github.com/bboyyu51
load: POSTWORLDThis software is released under the MIT License.

Copyright (c) 2019 bboyyu51

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.^)H1ԾҐHD   GBMB