public void saveMemory() {
   MainUtil.sendAdmin(BBC.OOM.s());
   // Set memory limited
   MemUtil.memoryLimitedTask();
   // Clear block placement
   clear();
   Fawe.get().getWorldEdit().clearSessions();
   // GC
   System.gc();
   System.gc();
   // Unload chunks
 }
 /** Lock the thread until the queue is empty */
 public void flush(int time) {
   if (size() > 0) {
     if (Fawe.get().isMainThread()) {
       SetQueue.IMP.flush(this);
     } else {
       if (enqueue()) {
         while (!isEmpty() && getStage() == SetQueue.QueueStage.ACTIVE) {
           synchronized (this) {
             try {
               this.wait(time);
             } catch (InterruptedException e) {
               e.printStackTrace();
             }
           }
         }
       }
     }
   }
 }
 public FaweQueue(World world) {
   if (world != null) {
     this.weWorld = world;
     this.world = Fawe.imp().getWorldName(world);
   }
 }