2020-04-14 06:40:22 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.permissions;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
|
|
|
|
|
|
|
public enum PermissionEntry
|
|
|
|
{
|
|
|
|
REMOVE("remove"),
|
|
|
|
OPERATORS("operators"),
|
|
|
|
MASTER_BUILDERS("master_builders"),
|
2020-09-28 02:51:15 +00:00
|
|
|
ADMINS("admins"),
|
|
|
|
SENIOR_ADMINS("senior_admins");
|
2020-04-14 06:40:22 +00:00
|
|
|
|
|
|
|
private final String configName;
|
|
|
|
|
|
|
|
PermissionEntry(String configName)
|
|
|
|
{
|
|
|
|
this.configName = configName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getConfigName()
|
|
|
|
{
|
|
|
|
return configName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<?> getList()
|
|
|
|
{
|
|
|
|
return getConfig().getList(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
public List<String> getEntry()
|
|
|
|
{
|
|
|
|
return (List<String>)getList();
|
|
|
|
}
|
|
|
|
|
|
|
|
private PermissionConfig getConfig()
|
|
|
|
{
|
2020-12-26 23:54:15 +00:00
|
|
|
return TotalFreedomMod.getPlugin().permissions;
|
2020-04-14 06:40:22 +00:00
|
|
|
}
|
|
|
|
}
|