Inaay / ClanAPI

ClanAPI virion for pocketmine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ClanAPI

ClanAPI is a virion for PocketMine-MP that provides basic functionality for managing clans

Open an issue if you have errors or dm me on discord Inaa#0001

Usage

To use the ClanAPI, you can create a new instance of the ClanAPI class:

use Inaayat\Clan\ClanAPI;
// MySQL
$clanAPI = new ClanAPI($ip, $username, $password, $database, $port);

You can then use the methods provided by the ClanAPI class to perform various operations on clans:

Creating and Deleting Clans

  • $clanAPI->createTable(): creates the necessary table in the database
  • $clanAPI->addClan($name, $leader): adds a new clan to the database
  • $clanAPI->deleteClan($name): deletes a clan from the database

Managing Clan Members

  • $clanAPI->addPlayerToClan($clan, $player): adds a player to a clan
  • $clanAPI->removePlayerFromClan($clan, $player): removes a player from a clan
  • $clanAPI->getClanByPlayer($player): gets the name of the clan that a player belongs to
  • $clanAPI->isLeader($player, $clan): checks if a player is the leader of a clan
  • $clanAPI->getAllPlayersInClan($clanName): gets an array of all players in a clan
  • $clanAPI->getPlayerCountInClan($clanName): gets the number of players in a clan
  • $clanAPI->isInClan($player): checks if a player is in a clan

Getting Clan Information

  • $clanAPI->getClan($name): gets information about a clan

Managing Clan Properties

  • $clanAPI->setClanDescription($clan, $description): sets the description of a clan
  • $clanAPI->addClanPoints($clan, $points): adds points to a clan
  • $clanAPI->removeClanPoints($clan, $points): removes points from a clan
  • $clanAPI->setClanPoints($clan, $points): sets the points of a clan
  • $clanAPI->isClanOpen($name): checks if a clan is open
  • $clanAPI->isClanClosed($name): checks if a clan is closed
  • $clanAPI->setClanStatus($name, $status): sets the status of a clan
  • $clanAPI->getClanDescription($name): gets the clan description
  • $clanAPI->getClanPoints($name): gets the clan points

About

ClanAPI virion for pocketmine

License:MIT License


Languages

Language:PHP 100.0%