mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-26 18:54:43 +02:00
Multiple changes
Working on async schematic saving Default plot clearing is now properly async (and somewhat slower) Offline mode servers now default to lowercase (there has been ample time to update) Fixed some issues with plot expiry Fixed some issues with UUID caching Optimized UUID fetching from cache (marginal)
This commit is contained in:
@ -45,7 +45,7 @@ public class CreateRoadSchematic extends SubCommand {
|
||||
return sendMessage(player, C.NOT_IN_PLOT_WORLD);
|
||||
}
|
||||
HybridUtils.manager.setupRoadSchematic(plot);
|
||||
MainUtil.sendMessage(player, "&6Saved new road schematic");
|
||||
MainUtil.sendMessage(player, "&6Saved new road schematic (see console for more information)");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ public class DebugExec extends SubCommand {
|
||||
PlotAnalysis analysis = plot.getComplexity();
|
||||
if (analysis != null) {
|
||||
int complexity = analysis.getComplexity();
|
||||
MainUtil.sendMessage(player, "Changes: " + analysis.changes);
|
||||
MainUtil.sendMessage(player, "Complexity: " + complexity);
|
||||
return true;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.config.Settings;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.object.RunnableVal;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.SchematicHandler;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
@ -37,17 +38,22 @@ public class Download extends SubCommand {
|
||||
}
|
||||
MainUtil.runners.put(plot, 1);
|
||||
MainUtil.sendMessage(plr, C.GENERATING_LINK);
|
||||
final CompoundTag tag = SchematicHandler.manager.getCompoundTag(plot.world, plot.id);
|
||||
TaskManager.runTaskAsync(new Runnable() {
|
||||
SchematicHandler.manager.getCompoundTag(plot.world, plot.id, new RunnableVal<CompoundTag>() {
|
||||
@Override
|
||||
public void run() {
|
||||
URL url = SchematicHandler.manager.upload(tag);
|
||||
if (url == null) {
|
||||
MainUtil.sendMessage(plr, C.GENERATING_LINK_FAILED);
|
||||
return;
|
||||
}
|
||||
MainUtil.sendMessage(plr, url.toString());
|
||||
MainUtil.runners.remove(plot);
|
||||
TaskManager.runTaskAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
URL url = SchematicHandler.manager.upload(value);
|
||||
if (url == null) {
|
||||
MainUtil.sendMessage(plr, C.GENERATING_LINK_FAILED);
|
||||
MainUtil.runners.remove(plot);
|
||||
return;
|
||||
}
|
||||
MainUtil.sendMessage(plr, url.toString());
|
||||
MainUtil.runners.remove(plot);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user