3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-07 20:10:06 +01:00

Fixed PlotSquared compiling issues

Dieser Commit ist enthalten in:
MattBDev 2019-09-19 16:43:21 -04:00
Ursprung c926cddbd6
Commit 68c8fca672
4 geänderte Dateien mit 18 neuen und 12 gelöschten Zeilen

Datei anzeigen

@ -13,6 +13,7 @@ import com.github.intellectualsites.plotsquared.plot.object.RunnableVal2;
import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3; import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3;
import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea; import com.github.intellectualsites.plotsquared.plot.object.worlds.SinglePlotArea;
import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEdit;
import java.util.concurrent.CompletableFuture;
@CommandDeclaration( @CommandDeclaration(
command = "cfi", command = "cfi",
@ -32,7 +33,7 @@ public class CFIRedirect extends Command {
} }
@Override @Override
public void execute(final PlotPlayer player, String[] args, RunnableVal3<Command, Runnable, Runnable> confirm, RunnableVal2<Command, CommandResult> whenDone) throws CommandException { public CompletableFuture<Boolean> execute(final PlotPlayer player, String[] args, RunnableVal3<Command, Runnable, Runnable> confirm, RunnableVal2<Command, CommandResult> whenDone) throws CommandException {
checkTrue(args.length >= 1, Captions.COMMAND_SYNTAX, getUsage()); checkTrue(args.length >= 1, Captions.COMMAND_SYNTAX, getUsage());
final Plot plot = check(player.getCurrentPlot(), Captions.NOT_IN_PLOT); final Plot plot = check(player.getCurrentPlot(), Captions.NOT_IN_PLOT);
checkTrue(plot.isOwner(player.getUUID()), Captions.NOW_OWNER); checkTrue(plot.isOwner(player.getUUID()), Captions.NOW_OWNER);
@ -42,7 +43,8 @@ public class CFIRedirect extends Command {
player.sendMessage("The command has been changed to: //cfi"); player.sendMessage("The command has been changed to: //cfi");
} else { } else {
player.sendMessage("Must have the `worlds` component enabled in the PlotSquared config.yml"); player.sendMessage("Must have the `worlds` component enabled in the PlotSquared config.yml");
return; return CompletableFuture.completedFuture(false);
} }
return CompletableFuture.completedFuture(true);
} }
} }

Datei anzeigen

@ -13,6 +13,7 @@ import com.sk89q.worldedit.function.operation.Operations;
import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion; import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.World;
import java.util.concurrent.CompletableFuture;
public class FaweChunkManager extends ChunkManager { public class FaweChunkManager extends ChunkManager {
@ -28,13 +29,13 @@ public class FaweChunkManager extends ChunkManager {
} }
@Override @Override
public boolean loadChunk(String world, ChunkLoc loc, boolean force) { public CompletableFuture loadChunk(String world, ChunkLoc loc, boolean force) {
return parent.loadChunk(world, loc, force); return parent.loadChunk(world, loc, force);
} }
@Override @Override
public void unloadChunk(String world, ChunkLoc loc, boolean save, boolean safe) { public void unloadChunk(String world, ChunkLoc loc, boolean save) {
parent.unloadChunk(world, loc, save, safe); parent.unloadChunk(world, loc, save);
} }
@Override @Override

Datei anzeigen

@ -114,9 +114,10 @@ public class FaweLocalBlockQueue extends LocalBlockQueue {
} }
@Override @Override
public void enqueue() { public boolean enqueue() {
super.enqueue(); boolean val = super.enqueue();
IMP.enableQueue(); IMP.enableQueue();
return val;
} }
@Override @Override

Datei anzeigen

@ -29,6 +29,7 @@ import com.sk89q.worldedit.world.biome.Biomes;
import com.sk89q.worldedit.world.registry.BiomeRegistry; import com.sk89q.worldedit.world.registry.BiomeRegistry;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.ThreadLocalRandom;
@CommandDeclaration( @CommandDeclaration(
@ -46,12 +47,12 @@ public class PlotSetBiome extends Command {
} }
@Override @Override
public void execute(final PlotPlayer player, String[] args, RunnableVal3<Command, Runnable, Runnable> confirm, RunnableVal2<Command, CommandResult> whenDone) throws CommandException { public CompletableFuture<Boolean> execute(final PlotPlayer player, String[] args, RunnableVal3<Command, Runnable, Runnable> confirm, RunnableVal2<Command, CommandResult> whenDone) throws CommandException {
final Plot plot = check(player.getCurrentPlot(), Captions.NOT_IN_PLOT); final Plot plot = check(player.getCurrentPlot(), Captions.NOT_IN_PLOT);
checkTrue(plot.isOwner(player.getUUID()) || Permissions.hasPermission(player, "plots.admin.command.generatebiome"), Captions.NO_PLOT_PERMS); checkTrue(plot.isOwner(player.getUUID()) || Permissions.hasPermission(player, "plots.admin.command.generatebiome"), Captions.NO_PLOT_PERMS);
if (plot.getRunning() != 0) { if (plot.getRunning() != 0) {
Captions.WAIT_FOR_TIMER.send(player); Captions.WAIT_FOR_TIMER.send(player);
return; return null;
} }
checkTrue(args.length == 1, Captions.COMMAND_SYNTAX, getUsage()); checkTrue(args.length == 1, Captions.COMMAND_SYNTAX, getUsage());
final HashSet<RegionWrapper> regions = plot.getRegions(); final HashSet<RegionWrapper> regions = plot.getRegions();
@ -59,10 +60,10 @@ public class PlotSetBiome extends Command {
Collection<BiomeType> knownBiomes = BiomeTypes.values(); Collection<BiomeType> knownBiomes = BiomeTypes.values();
final BiomeType biome = Biomes.findBiomeByName(knownBiomes, args[0], biomeRegistry); final BiomeType biome = Biomes.findBiomeByName(knownBiomes, args[0], biomeRegistry);
if (biome == null) { if (biome == null) {
String biomes = StringMan.join(WorldUtil.IMP.getBiomeList(), Captions.BLOCK_LIST_SEPARATER.toString()); String biomes = StringMan.join(WorldUtil.IMP.getBiomeList(), Captions.BLOCK_LIST_SEPARATOR.toString());
Captions.NEED_BIOME.send(player); Captions.NEED_BIOME.send(player);
MainUtil.sendMessage(player, Captions.SUBCOMMAND_SET_OPTIONS_HEADER.toString() + biomes); MainUtil.sendMessage(player, Captions.SUBCOMMAND_SET_OPTIONS_HEADER.toString() + biomes);
return; return CompletableFuture.completedFuture(false);
} }
confirm.run(this, new Runnable() { confirm.run(this, new Runnable() {
@Override @Override
@ -94,5 +95,6 @@ public class PlotSetBiome extends Command {
} }
}, null); }, null);
return CompletableFuture.completedFuture(true);
} }
} }