Package com.bergerkiller.bukkit.common

Examples of com.bergerkiller.bukkit.common.AsyncTask


    if (worldConfig.isLoaded()) {
      CommonUtil.sendMessage(sender, ChatColor.RED + "Can not delete a loaded world!");
      return;
    }
    WorldConfig.remove(worldConfig.worldname);
    new AsyncTask("World deletion thread") {
      public void run() {
        if (worldConfig.deleteWorld()) {
          CommonUtil.sendMessage(sender, ChatColor.GREEN + "World '" + worldConfig.worldname + "' has been removed!");
        } else {
          CommonUtil.sendMessage(sender, ChatColor.RED + "Failed to (completely) remove the world!");
View Full Code Here


    }.start();
  }
  public static void copy(final CommandSender sender, final String oldworld, final String newworld) {
    final WorldConfig oldconfig = WorldConfig.get(oldworld);
    final WorldConfig newconfig = WorldConfig.get(newworld);
    new AsyncTask("World copy thread") {
      public void run() {
        if (oldconfig.copyTo(newconfig)) {
          CommonUtil.sendMessage(sender, ChatColor.GREEN + "World '" + oldworld + "' has been copied as '" + newworld + "'!");
        } else {
          CommonUtil.sendMessage(sender, ChatColor.RED + "Failed to copy world to '" + newworld + "'!");
View Full Code Here

    final WorldConfig config = WorldConfig.get(worldname);
    if (config.isLoaded()) {
      CommonUtil.sendMessage(sender, ChatColor.RED + "Can not repair a loaded world!");
      return;
    }
    new AsyncTask("World repair thread") {
      public void run() {
        boolean hasMadeFixes = false;
        if (config.isBroken()) {
          if (config.resetData(seed)) {
            hasMadeFixes = true;
View Full Code Here

TOP

Related Classes of com.bergerkiller.bukkit.common.AsyncTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.