Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.
/ OpenAPI Public archive

API for people who want help with HappyBE development

License

Notifications You must be signed in to change notification settings

HappyBedrock/OpenAPI

Repository files navigation

OpenAPI

API for people who want help with HappyBE development

Documentation:

Economy:

  • Adding coins for player
/**
* @var \pocketmine\Player $player
* @var int $coins
*/
\happybe\openapi\economy\Economy::addCoins($player, $coins);
  • Obtaining coins
/** @var \pocketmine\Player $player */
\happybe\openapi\economy\Economy::getCoins($player, function(int $amount) use ($player) {
    $player->sendMessage("§l§o§eACCOUNT§r§f: §bCurrently you have $amount coins!");
});

Multi-Server API:

  • Checking if server is online and transferring player here if so
$server = \happybe\openapi\servers\ServerManager::getServer("Lobby-2");
if($server->isOnline()) {
    /** @var \pocketmine\Player $player */
    $server->transferPlayerHere($player);
}

Ranks

  • Obtaining player's rank
/** @var \pocketmine\Player $player */
$rank = \happybe\openapi\ranks\RankDatabase::getPlayerRank($player);
$player->sendMessage("§l§o§eACCOUNT§r§f: §bYour rank: " . $rank->getName());

About

API for people who want help with HappyBE development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages