Search in sources :

Example 1 with WorldEdit

use of com.sk89q.worldedit.WorldEdit in project modules-extra by CubeEngine.

the class LogEditSessionFactory method shutdown.

public static void shutdown() {
    WorldEdit instance = WorldEdit.getInstance();
    if (instance != null) {
        EditSessionFactory editSessionFactory = instance.getEditSessionFactory();
        if (editSessionFactory instanceof LogEditSessionFactory) {
            ((LogEditSessionFactory) editSessionFactory).module.getLog().debug("WorldEdit EditSessionFactory restored!");
            instance.setEditSessionFactory(((LogEditSessionFactory) editSessionFactory).oldFactory);
        }
    }
}
Also used : WorldEdit(com.sk89q.worldedit.WorldEdit) EditSessionFactory(com.sk89q.worldedit.EditSessionFactory)

Example 2 with WorldEdit

use of com.sk89q.worldedit.WorldEdit in project modules-extra by CubeEngine.

the class LogEditSessionFactory method initialize.

public static boolean initialize(Log module) {
    WorldEdit worldEdit = WorldEdit.getInstance();
    if (worldEdit != null) {
        LogEditSessionFactory factory = new LogEditSessionFactory(module, worldEdit.getEditSessionFactory());
        worldEdit.setEditSessionFactory(factory);
        module.getActionManager().registerListener(factory.listener);
        return true;
    }
    return false;
}
Also used : WorldEdit(com.sk89q.worldedit.WorldEdit)

Aggregations

WorldEdit (com.sk89q.worldedit.WorldEdit)2 EditSessionFactory (com.sk89q.worldedit.EditSessionFactory)1