Created
October 19, 2019 04:52
-
-
Save sarhatabaot/1dfaf1c472e90509d01f2778ff58ebf5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class LuckPermsIntergrationTest extends JavaPlugin { | |
private static LuckPermsApi luckPermsApi; | |
@Override | |
public void onEnable() { | |
RegisteredServiceProvider<LuckPermsApi> provider = Bukkit.getServicesManager().getRegistration(LuckPermsApi.class); | |
if (provider != null) { | |
setLuckPermsApi(provider.getProvider()); | |
} | |
// Plugin startup logic | |
} | |
@Override | |
public void onDisable() { | |
// Plugin shutdown logic | |
} | |
public void rankup(Player player, String rankupGroup) { | |
String currentGroup = luckPermsApi.getUser(player.getUniqueId()).getPrimaryGroup(); | |
//your rankup logic here | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment