PHP: if(($player = $this->getServer()->getPlayer($args[0])) instanceof Player) { $name = $player->getName(); $id = $player->getUniqueId(); $banned = $this->getConfig()->get("Banned", []); $times = $this->getConfig()->get("Times", []); $banned[$name] = $cid; $times[$cid] = -1; $this->getConfig()->set("Banned", $banned); $this->getConfig()->set("Times", $times); $this->getConfig()->save(); $player->setBanned(true); //easy way to kick the player while giving a ban message $sender->sendMessage($name." is now banned with the cid: ".$cid); }else{ $sender->sendMessage("That player isn't online right now!"); Code: 2017-06-29 [12:57:23] [Server thread/CRITICAL]: Unhandled exception executing command 'bancid Affan' in bancid: Undefined variable: cid 2017-06-29 [12:57:23] [Server thread/CRITICAL]: ErrorException: "Undefined variable: cid" (EXCEPTION) in "/BanClientId-master/src/AffanStarPure/Main" at line 34 How i fix this getting error ban client