public static void deinit() {
   // Obtain a blank new Queue with the elements of the original, and filter out timed wrappers
   PriorityQueue<Object> queue =
       new PriorityQueue<Object>(CraftSchedulerRef.pending.get(Bukkit.getScheduler()));
   for (Object element : queue) {
     // Remove the timed wrapper if needed
     if (CraftTaskRef.TEMPLATE.isType(element)) {
       Runnable run = CraftTaskRef.task.get(element);
       if (run instanceof TimedWrapper) {
         CraftTaskRef.task.set(element, ((TimedWrapper) run).getProxyBase());
       }
     }
   }
   // Set in the server
   CraftSchedulerRef.pending.set(Bukkit.getScheduler(), queue);
 }
 @Override
 public Object remove() {
   if (!logger.isRunning()) {
     return super.remove();
   }
   Object o = super.remove();
   if (o == null) {
     return null;
   }
   try {
     if (CraftTaskRef.TEMPLATE.isType(o)) {
       Runnable run = CraftTaskRef.task.get(o);
       if (run != null && !logger.isIgnoredTask(run)) {
         Plugin plugin = CraftTaskRef.plugin.get(o);
         if (plugin != null && plugin.isEnabled()) {
           CraftTaskRef.task.set(o, logger.getWrapper(run, plugin));
         }
       }
     }
   } catch (Throwable t) {
     NoLagg.plugin.handle(t);
   }
   return o;
 }