Search in sources :

Example 1 with ChunkPreGenerate

use of org.spongepowered.api.world.ChunkPreGenerate in project Nucleus by NucleusPowered.

the class WorldHelper method cancelPregenRunningForWorld.

public boolean cancelPregenRunningForWorld(UUID uuid) {
    cleanup();
    if (pregen.containsKey(uuid)) {
        ChunkPreGenerate cpg = pregen.remove(uuid);
        getChannel().send(NucleusPlugin.getNucleus().getMessageProvider().getTextMessageWithFormat("command.pregen.gen.cancelled2", String.valueOf(cpg.getTotalGeneratedChunks()), String.valueOf(cpg.getTotalSkippedChunks()), DurationFormatUtils.formatDuration(cpg.getTotalTime().toMillis(), TIME_FORMAT, false)));
        cpg.cancel();
        return true;
    }
    return false;
}
Also used : ChunkPreGenerate(org.spongepowered.api.world.ChunkPreGenerate)

Aggregations

ChunkPreGenerate (org.spongepowered.api.world.ChunkPreGenerate)1