Exemplo n.º 1
0
 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
 }
Exemplo n.º 2
0
 /** 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();
             }
           }
         }
       }
     }
   }
 }
Exemplo n.º 3
0
 public FaweQueue(World world) {
   if (world != null) {
     this.weWorld = world;
     this.world = Fawe.imp().getWorldName(world);
   }
 }