use of com.fastasyncworldedit.bukkit.BukkitPermissionAttachmentManager in project FastAsyncWorldEdit by IntellectualSites.
the class WorldEditPlugin method onLoad.
@Override
public void onLoad() {
// FAWE start
// This is already covered by Spigot, however, a more pesky warning with a proper explanation over "Ambiguous plugin name..." can't hurt.
Plugin[] plugins = Bukkit.getServer().getPluginManager().getPlugins();
for (Plugin p : plugins) {
if (p.getName().equals("WorldEdit")) {
LOGGER.warn("You installed WorldEdit alongside FastAsyncWorldEdit. That is unneeded and will cause unforeseen issues, " + "because FastAsyncWorldEdit already provides WorldEdit. " + "Stop your server and delete the 'worldedit-bukkit' jar from your plugins folder.");
}
}
// FAWE end
INSTANCE = this;
// noinspection ResultOfMethodCallIgnored
getDataFolder().mkdirs();
WorldEdit worldEdit = WorldEdit.getInstance();
// Setup platform
platform = new BukkitServerInterface(this, getServer());
worldEdit.getPlatformManager().register(platform);
// FAWE start - Migrate from config-legacy to worldedit-config
migrateLegacyConfig();
// FAWE end
// FAWE start - Modify WorldEdit config name
config = new BukkitConfiguration(new YAMLProcessor(new File(getDataFolder(), "worldedit-config.yml"), true), this);
// FAWE end
// FAWE start - Setup permission attachments
permissionAttachmentManager = new BukkitPermissionAttachmentManager(this);
// FAWE end
Path delChunks = Paths.get(getDataFolder().getPath(), DELCHUNKS_FILE_NAME);
if (Files.exists(delChunks)) {
ChunkDeleter.runFromFile(delChunks, true);
}
// FAWE start - Delete obsolete DummyFawe from pre 1.14 days
if (this.getDataFolder().getParentFile().listFiles(file -> {
if (file.getName().equals("DummyFawe.jar")) {
file.delete();
return true;
}
return false;
}).length > 0) {
LOGGER.warn("DummyFawe detected and automatically deleted! This file is no longer necessary.");
}
// FAWE end
}
Aggregations