Skip to content
IvanCraft623 edited this page Jun 16, 2022 · 1 revision

Rank Manager

Class that manage ranks

$rankmanager = $ranksystem->getRankManager();

Rank

Class that contains the data of a rank

Get a Rank

Gets a rank through its name.

$rank = $rankmanager->getRank("Admin");

Default rank

This rank is the one that players will have by default in case they have not been assigned any.

$defaultrank = $rankmanager->getDefault();

You can set the default rank:

$rankmanager->setDefault($rank);

Create a Rank

$rankmanager->create("YouTuber", // Rank name
	[
		"prefix" => "§8[§cYou§fTuber§8] ", // NameTag prefix
		"nameColor" => "§e" // NameTag name color
	],
	[
		"prefix" => "§8[§cYou§fTuber§8] ", // Chat prefix
		"nameColor" => "§e" // Chat name color
		"chatFormat" => "§8: §7" // Chat format
	],
	["example.perm"] // permissions
);

Delete a Rank

You can provide the rank name or the object.

$rankmanager->delete("YouTuber");
// or
$rankmanager->delete($rank);
Clone this wiki locally