LuckPerms Integration (1/2)

This is part 1 of 2 of the luckperms integration for our switch to permissions.
This commit is contained in:
Paul Reilly
2023-03-29 00:46:32 -05:00
parent f91c21cc81
commit 65540b7f3a
96 changed files with 567 additions and 724 deletions

View File

@ -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;
}
}