PHP: if($args[0] == "create") { if($this->plugin->commands->get("/f create") == false) { $sender->sendMessage($this->plugin->formatMessage("This command has been disabled, please ask\nan Admin if you think this is a mistake.")); return true; } if(!isset($args[1])) { $sender->sendMessage($this->plugin->formatMessage("Usage: /f create <faction name>")); return true; } if(!(ctype_alnum($args[1]))) { $sender->sendMessage($this->plugin->formatMessage("You may only use letters and numbers!")); return true; } if($this->plugin->isNameBanned($args[1])) { $sender->sendMessage($this->plugin->formatMessage("This name is not allowed.")); return true; } if($this->plugin->factionExists($args[1]) == true ) { $sender->sendMessage($this->plugin->formatMessage("Faction already exists")); return true; } if(strlen($args[1]) > $this->plugin->prefs->get("Maximum Faction Name Length")) { $sender->sendMessage($this->plugin->formatMessage("This name is too long. Please try again!")); return true; } if($ses->inFaction()) { $sender->sendMessage($this->plugin->formatMessage("You must leave this faction first")); return true; } else { $factionName = $args[1]; $f = new Faction($this->plugin, $args[1], $sender->getPlayer()); //TODO: Split into two lines $ses->updateFaction(); $sender->sendMessage($this->plugin->formatMessage("Faction successfully created!", true)); return true; } }How add to factionspro buy faction for item Sorry for my english
First off, do not put question into the code block. For making transaction system, read the API of the plugin you want it to be compatible with. Then, use if functions to make sure that the player meets certain conditions. (Sufficient cash, spaces in the inventory, etc) After that, give player the item.