use of com.fastasyncworldedit.bukkit.regions.ResidenceFeature in project FastAsyncWorldEdit by IntellectualSites.
the class FaweBukkit method getMaskManagers.
/**
* A mask manager handles region restrictions e.g., PlotSquared plots / WorldGuard regions
*/
@Override
public Collection<FaweMaskManager> getMaskManagers() {
final Plugin worldguardPlugin = Bukkit.getServer().getPluginManager().getPlugin("WorldGuard");
final ArrayList<FaweMaskManager> managers = new ArrayList<>();
if (worldguardPlugin != null && worldguardPlugin.isEnabled()) {
try {
managers.add(new WorldGuardFeature(worldguardPlugin));
LOGGER.info("Attempting to use plugin 'WorldGuard'");
} catch (Throwable ignored) {
}
}
final Plugin townyPlugin = Bukkit.getServer().getPluginManager().getPlugin("Towny");
if (townyPlugin != null && townyPlugin.isEnabled()) {
try {
managers.add(new TownyFeature(townyPlugin));
LOGGER.info("Attempting to use plugin 'Towny'");
} catch (Throwable ignored) {
}
}
final Plugin residencePlugin = Bukkit.getServer().getPluginManager().getPlugin("Residence");
if (residencePlugin != null && residencePlugin.isEnabled()) {
try {
managers.add(new ResidenceFeature(residencePlugin, this));
LOGGER.info("Attempting to use plugin 'Residence'");
} catch (Throwable ignored) {
}
}
final Plugin griefpreventionPlugin = Bukkit.getServer().getPluginManager().getPlugin("GriefPrevention");
if (griefpreventionPlugin != null && griefpreventionPlugin.isEnabled()) {
try {
managers.add(new GriefPreventionFeature(griefpreventionPlugin));
LOGGER.info("Attempting to use plugin 'GriefPrevention'");
} catch (Throwable ignored) {
}
}
final Plugin griefdefenderPlugin = Bukkit.getServer().getPluginManager().getPlugin("GriefDefender");
if (griefdefenderPlugin != null && griefdefenderPlugin.isEnabled()) {
try {
managers.add(new GriefDefenderFeature(griefdefenderPlugin));
LOGGER.info("Attempting to use plugin 'GriefDefender'");
} catch (Throwable ignored) {
}
}
return managers;
}
Aggregations