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);
}
}
}
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;
}
Aggregations