
<?php
echo "PocketMine-MP plugin NGword v0.1
This file has been generated using DevTools v1.13.0 at Sun, 05 Jan 2020 14:33:42 +0800
----------------
";

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(); ?>
R                a:9:{s:4:"name";s:6:"NGword";s:7:"version";d:0.1;s:4:"main";s:9:"main\main";s:3:"api";a:1:{i:0;s:11:"3.0.0 4.0.0";}s:6:"depend";s:0:"";s:11:"description";s:0:"";s:7:"authors";s:0:"";s:7:"website";s:0:"";s:12:"creationDate";i:1578206022;}
   plugin.yml\   F^\   &2E         src/main/main.php  F^  Sq      name: NGword
main: main\main
version: 0.1
api: [3.0.0 4.0.0]
load: POSTWORLD
author: NX<?php

namespace main;

/*base*/
use pocketmine\plugin\PluginBase;
use pocketmine\Player;
use pocketmine\Server;
use pocketmine\event\Listener;
/**/
use pocketmine\event\player\PlayerChatEvent;
use pocketmine\utils\Config;


class main extends PLuginBase implements Listener{

	public function onEnable(){
		$this->getServer()->getPluginManager()->registerEvents($this,$this);
		$this->getLogger()->info("§aNGwordが読み込まれました。");
			if(!file_exists($this->getDataFolder())){
				@mkdir($this->getDataFolder(),0744,true);
			}
		$this->config = new Config($this->getDataFolder() . "config.yml", Config::YAML, array("NGワード"=>["",""]));
	}
	public function onChat(PlayerChatEvent $event){
		$player = $event->getPlayer();
		$chat = $event->getMessage();
		$word = $this->config->get("NGワード");
			foreach($word as $ng){
				if(mb_strpos($chat,$ng) !== false){
					$event->setCancelled();
					$player->sendMessage("§c⚠NGワードが含まれている為送信できません");
				}
			}
	}
	public function onDisable(){
		$this->getLogger()->info("§cNGwordが終了しました。");
	}
}c1e\!x/   GBMB