Search in sources :

Example 1 with WorldEditPlugin

use of com.sk89q.worldedit.bukkit.WorldEditPlugin 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)

Example 2 with WorldEditPlugin

use of com.sk89q.worldedit.bukkit.WorldEditPlugin in project WildernessTp by AcmeProject.

the class PortalzGoneWild method createPortal.

public void createPortal(Player p, String name) {
    WildTP.debug("Got create portal");
    WorldEditPlugin we = (WorldEditPlugin) Bukkit.getServer().getPluginManager().getPlugin("WorldEdit");
    Selection sel = we.getSelection(p);
    if (name == null) {
        p.sendMessage("Invalid Name");
        return;
    }
    if (sel == null) {
        p.sendMessage("Invalid WorldEdit Selection");
        return;
    }
    savePortal("Portals." + name, stringConvert(sel.getMaximumPoint()) + "~" + stringConvert(sel.getMinimumPoint()), p);
}
Also used : WorldEditPlugin(com.sk89q.worldedit.bukkit.WorldEditPlugin) Selection(com.sk89q.worldedit.bukkit.selections.Selection)

Example 3 with WorldEditPlugin

use of com.sk89q.worldedit.bukkit.WorldEditPlugin in project HawkEye by oliverwoodings.

the class HawkEye method checkDependencies.

/**
	 * Checks if required plugins are loaded
	 * @param pm PluginManager
	 */
private void checkDependencies(PluginManager pm) {
    //Check if WorldEdit is loaded
    Plugin we = pm.getPlugin("WorldEdit");
    if (we != null) {
        worldEdit = (WorldEditPlugin) we;
        Util.info("WorldEdit found, selection rollbacks enabled");
    } else
        Util.info("WARNING! WorldEdit not found, WorldEdit selection rollbacks disabled until WorldEdit is available");
}
Also used : Plugin(org.bukkit.plugin.Plugin) JavaPlugin(org.bukkit.plugin.java.JavaPlugin) WorldEditPlugin(com.sk89q.worldedit.bukkit.WorldEditPlugin)

Aggregations

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