Skip to content

How to install?

ClickedTran_VN edited this page Jan 10, 2024 · 6 revisions

Step 1:

Make sure you have installed libRanks into the directory virions

Step 2:

Add the path use ClickedTran\libRanks\libRanks to your file Main.php

EXAMPLE:
<?php
namespace YourFile;
use ClickedTran\libRanks\libRanks;
// Paths of other plugins

Step 3:

Remember add public $rankProvider to avoid making errors and you will need it 😉

Step 4:

After performing step 2, add the following code to the onEnable() : void section of Main.php
WARNING The code below is required for your plugin to be able to use libRanks

libRanks::init();
libRanks::getProvider($this->getConfig()->get("rank"));
Example:
...function onEnable() : void
{
   libRanks::init();
   $this->rankProvider = libRanks::getProvider($this->getConfig()->get("rank"));
   // Everything in here
}

Step 5:

If you have completed the REQUIRED steps above, you should be able to use the virion libRanks. Steps like give rank, remove rank, ... I have put in README.md, please see for clarity or you can continue watching in the wiki!

Clone this wiki locally