Search in sources :

Example 1 with PrismBlockEditHandler

use of me.botsko.prism.bridge.PrismBlockEditHandler in project Prism-Bukkit by prism.

the class Prism method checkPluginDependancies.

/**
	 * 
	 */
public void checkPluginDependancies() {
    // WorldEdit
    final Plugin we = getServer().getPluginManager().getPlugin("WorldEdit");
    if (we != null) {
        plugin_worldEdit = (WorldEditPlugin) we;
        //Easier and foolproof way.
        try {
            WorldEdit.getInstance().getEventBus().register(new PrismBlockEditHandler());
            log("WorldEdit found. Associated features enabled.");
        } catch (Throwable error) {
            log("Required WorldEdit version is 6.0.0 or greater! Certain optional features of Prism disabled.");
        }
    } else {
        log("WorldEdit not found. Certain optional features of Prism disabled.");
    }
}
Also used : PrismBlockEditHandler(me.botsko.prism.bridge.PrismBlockEditHandler) Plugin(org.bukkit.plugin.Plugin) JavaPlugin(org.bukkit.plugin.java.JavaPlugin) WorldEditPlugin(com.sk89q.worldedit.bukkit.WorldEditPlugin)

Aggregations

WorldEditPlugin (com.sk89q.worldedit.bukkit.WorldEditPlugin)1 PrismBlockEditHandler (me.botsko.prism.bridge.PrismBlockEditHandler)1 Plugin (org.bukkit.plugin.Plugin)1 JavaPlugin (org.bukkit.plugin.java.JavaPlugin)1