Fix regen. Fixes #2692

This commit is contained in:
Alexander Söderberg
2020-02-24 14:00:45 +01:00
parent 6be26e8047
commit b99631f1bd
4 changed files with 20 additions and 6 deletions

View File

@ -7,8 +7,10 @@ import com.github.intellectualsites.plotsquared.plot.object.PlotArea;
import com.github.intellectualsites.plotsquared.plot.object.PlotId;
import com.github.intellectualsites.plotsquared.plot.util.MathMan;
import com.github.intellectualsites.plotsquared.plot.util.block.ScopedLocalBlockQueue;
import com.google.common.base.Preconditions;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockTypes;
import org.jetbrains.annotations.NotNull;
public class HybridGen extends IndependentPlotGenerator {
@ -34,7 +36,10 @@ public class HybridGen extends IndependentPlotGenerator {
}
}
@Override public void generateChunk(ScopedLocalBlockQueue result, PlotArea settings) {
@Override public void generateChunk(@NotNull ScopedLocalBlockQueue result, @NotNull PlotArea settings) {
Preconditions.checkNotNull(result, "result cannot be null");
Preconditions.checkNotNull(settings, "settings cannot be null");
HybridPlotWorld hpw = (HybridPlotWorld) settings;
// Biome
result.fillBiome(hpw.PLOT_BIOME);

View File

@ -86,7 +86,7 @@ public class OperationUtil {
return weWorld;
}
private static EditSession createEditSession(PlotPlayer plotPlayer) {
private static EditSession createEditSession(PlotPlayer plotPlayer) {
Actor actor = plotPlayer.toActor();
World weWorld = getWorld(plotPlayer, actor);
return createEditSession(weWorld, actor);
@ -100,7 +100,7 @@ public class OperationUtil {
return createEditSession(world, actor, getSession(actor));
}
private static EditSession createEditSession(World world, Actor actor, LocalSession session) {
private static EditSession createEditSession(World world, Actor actor, LocalSession session) {
EditSession editSession;
Player player = actor.isPlayer() ? (Player) actor : null;
editSession = WorldEdit.getInstance().getEditSessionFactory()