Resolve TODOs

This commit is contained in:
Hannes Greule 2020-06-05 14:13:03 +02:00 committed by Alexander Söderberg
parent b6f1610a7e
commit 033b87deb5
3 changed files with 7 additions and 7 deletions

View File

@ -72,7 +72,6 @@ public class Setup extends SubCommand {
SetupProcess process = player.getMeta("setup"); SetupProcess process = player.getMeta("setup");
if (process == null) { if (process == null) {
if (args.length > 0) { if (args.length > 0) {
// TODO use old behaviour?
MainUtil.sendMessage(player, Captions.SETUP_NOT_STARTED); MainUtil.sendMessage(player, Captions.SETUP_NOT_STARTED);
return true; return true;
} }

View File

@ -30,6 +30,7 @@ import com.plotsquared.core.plot.PlotArea;
import com.plotsquared.core.plot.PlotId; import com.plotsquared.core.plot.PlotId;
import com.plotsquared.core.plot.SetupObject; import com.plotsquared.core.plot.SetupObject;
import com.plotsquared.core.queue.ScopedLocalBlockQueue; import com.plotsquared.core.queue.ScopedLocalBlockQueue;
import com.plotsquared.core.setup.PlotAreaBuilder;
import com.plotsquared.core.setup.SetupProcess; import com.plotsquared.core.setup.SetupProcess;
/** /**
@ -83,9 +84,9 @@ public abstract class IndependentPlotGenerator {
* If any additional setup options need to be changed before world creation. * If any additional setup options need to be changed before world creation.
* - e.g. If setup doesn't support some standard options * - e.g. If setup doesn't support some standard options
* *
* @param setupProcess the setup process to modify * @param builder the area builder to modify
*/ */
public void processSetup(SetupProcess setupProcess) { } public void processAreaSetup(PlotAreaBuilder builder) { }
/** /**
* It is preferred for the PlotArea object to do most of the initialization necessary. * It is preferred for the PlotArea object to do most of the initialization necessary.

View File

@ -73,8 +73,8 @@ public enum CommonSetupSteps implements SetupStep {
if (builder.settingsNodesWrapper() == null) { if (builder.settingsNodesWrapper() == null) {
builder.plotManager(builder.generatorName()); builder.plotManager(builder.generatorName());
builder.settingsNodesWrapper(CommonSetupSteps.wrap(builder.plotManager())); builder.settingsNodesWrapper(CommonSetupSteps.wrap(builder.plotManager()));
// TODO reimplement SetupUtils.generators.get(object.plotManager).getPlotGenerator() SetupUtils.generators.get(builder.plotManager()).getPlotGenerator()
// .processSetup(process); .processAreaSetup(builder);
} }
return builder.settingsNodesWrapper().getFirstStep(); return builder.settingsNodesWrapper().getFirstStep();
} else { } else {
@ -82,8 +82,8 @@ public enum CommonSetupSteps implements SetupStep {
builder.plotManager(builder.generatorName()); builder.plotManager(builder.generatorName());
builder.generatorName(null); builder.generatorName(null);
builder.settingsNodesWrapper(CommonSetupSteps.wrap(builder.plotManager())); builder.settingsNodesWrapper(CommonSetupSteps.wrap(builder.plotManager()));
// TODO reimplement SetupUtils.generators.get(object.plotManager).getPlotGenerator() SetupUtils.generators.get(builder.plotManager()).getPlotGenerator()
// .processSetup(process); .processAreaSetup(builder);
} else { } else {
builder.plotManager(PlotSquared.imp().getPluginName()); builder.plotManager(PlotSquared.imp().getPluginName());
MainUtil.sendMessage(plotPlayer, Captions.SETUP_WRONG_GENERATOR); MainUtil.sendMessage(plotPlayer, Captions.SETUP_WRONG_GENERATOR);