mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 12:36:41 +00:00
LuckPerms Integration (1/2)
This is part 1 of 2 of the luckperms integration for our switch to permissions.
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
package me.totalfreedom.totalfreedommod.bridge;
|
||||
|
||||
import net.luckperms.api.LuckPerms;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.bukkit.plugin.UnknownDependencyException;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
public class LuckPermsBridge
|
||||
{
|
||||
private final LuckPerms luckPerms;
|
||||
|
||||
public LuckPermsBridge()
|
||||
{
|
||||
RegisteredServiceProvider<LuckPerms> provider = Bukkit.getServicesManager()
|
||||
.getRegistration(LuckPerms.class);
|
||||
|
||||
if (provider == null) throw new UnknownDependencyException("LuckPerms must be present!");
|
||||
|
||||
this.luckPerms = provider.getProvider();
|
||||
}
|
||||
|
||||
public LuckPerms getAPI()
|
||||
{
|
||||
return luckPerms;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user