Hi! I have been working on this plugin. I'm not sure whats wrong with it My Loader: PHP: <?phpnamespace RTG\ChatFilter;/* Essentials */use pocketmine\plugin\PluginBase;use pocketmine\event\Listener;use pocketmine\Player;use pocketmine\Server;use pocketmine\utils\Config;/* Execution */use pocketmine\command\CommandExecutor;use RTG\ChatFilter\CMD\FilterCommand;use pocketmine\event\player\PlayerChatEvent;class Loader extends PluginBase implements Listener { public $whitelist; public function onEnable() { $this->getServer()->getPluginManager()->registerEvents($this, $this); /* For Commands */ $this->getCommand("cf")->setExecutor(new FilterCommand ($this)); /* CFG Setup */ $this->whitelist = array(); @mkdir ($this->getDataFolder()); $list = new Config($this->getDataFolder() . "bannednames.txt", Config::ENUM); $this->whitelist = explode(", ", $list->getAll()); $this->getLogger()->info("[LEET] ChatFilter has been enabled!"); } public function onSave() { $list = new Config($this->getDataFolder() . "bannednames.txt", Config::ENUM); $list->setAll($this->whitelist); $list->save(); } public function onChat(PlayerChatEvent $e) { $p = $e->getPlayer(); $msg = $e->getMessage(); $list = new Config($this->getDataFolder() . "bannednames.txt", Config::ENUM); $get = $list->getAll(); if(strpos(strtolower($msg, $get) !== FALSE)) { $p->sendMessage("[ChatFilter] Triggered!"); $e->setCancelled(true); } } public function getList() { return $this->whitelist; } public function onDisable() { $this->onSave(); } } My Command: PHP: <?phpnamespace RTG\ChatFilter\CMD;/* Essentials */use pocketmine\Server;use pocketmine\Player;use pocketmine\command\CommandExecutor;use pocketmine\command\CommandSender;use pocketmine\command\Command;use RTG\ChatFilter\Loader;use pocketmine\utils\Config;use pocketmine\utils\TextFormat as TF;class FilterCommand implements CommandExecutor { public $plugin; public function __construct(Loader $plugin) { $this->plugin = $plugin; } public function onCommand(CommandSender $sender, Command $cmd, $label, array $param) { switch(strtolower($cmd->getName())) { case "cf": if($sender->hasPermission("chatfilter.command")) { if(isset($param[0])) { switch(strtolower($param[0])) { case "help": $sender->sendMessage("[ChatFilter] /cf add [name]"); $sender->sendMessage("[ChatFilter] /cf rm [name]"); $sender->sendMessage("[ChatFilter] /cf help"); return true; break; case "add": if(isset($param[1])) { $n = $param[1]; if(isset($this->plugin->whitelist[strtolower($n)])) { $sender->sendMessage("[ChatFilter] The word '$n' Exists!"); } else { $this->plugin->whitelist[strtolower($n)] = $n; $sender->sendMessage("[ChatFilter] You have successfully added $n to the ban list!"); $this->plugin->onSave(); } } else { $sender->sendMessage("[ChatFilter] /cf help"); } return true; break; case "rm": if(isset($param[1])) { $n = $param[1]; if(isset($this->plugin->whitelist[strtolower($n)])) { unset($this->plugin->whitelist[strtolower($n)]); $sender->sendMessage("[ChatFilter] You have removed $n from the list!"); $this->plugin->onSave(); } else { $sender->sendMessage("[ChatFilter] The word $n doesn't exist in the List!"); } } else { $sender->sendMessage("[ChatFilter] /cf help"); } return true; break; case "list": $list = new Config($this->plugin->getDataFolder() . "bannednames.txt", Config::ENUM); $l = $list->getAll(true); $im = implode(", ", $l); $sender->sendMessage($im); return true; break; } } else { $sender->sendMessage("[ChatFilter] /cf help"); } } else { $sender->sendMessage(TF::RED . "You have no permission to use this command!"); } return true; break; } } } GitHub: https://github.com/RTGDaCoder/ChatFilter
$config->getAll() already returns an array of every key => value in the config. explode() can only be used on strings, not arrays.