protected function run(array $args, Session $sender) { if (!$sender instanceof ClassicSession) { return "This command is only available on PvP servers"; } if (isset($args[0])) { if ($args[0] === "on") { $on = true; } elseif ($args[0] === "off") { $on = false; } } if (!isset($on)) { return $sender->translate($sender->isFriendlyFireActivated() ? Phrases::CMD_FFA_CHECK_TRUE : Phrases::CMD_FFA_CHECK_FALSE); } $sender->setFriendlyFireActivated($on); return $sender->translate($on ? Phrases::CMD_FFA_SET_TRUE : Phrases::CMD_FFA_SET_FALSE); }