diff --git a/worldedit-core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java b/worldedit-core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java index 1dc34efd0..955d45c82 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/regions/general/plot/PlotSquaredFeature.java @@ -33,7 +33,6 @@ public class PlotSquaredFeature extends FaweMaskManager { public PlotSquaredFeature() { super("PlotSquared"); Fawe.debug("Optimizing PlotSquared"); -// PlotSquared.get().worldedit = null; setupBlockQueue(); setupSchematicHandler(); setupChunkManager(); @@ -43,15 +42,16 @@ public class PlotSquaredFeature extends FaweMaskManager { if (MainCommand.getInstance().getCommand("generatebiome") == null) { new PlotSetBiome(); } +// TODO: revisit this later on +/* try { -// new MoveTo512(); if (Settings.Enabled_Components.WORLDS) { new ReplaceAll(); -// new CFIRedirect(); } } catch (Throwable e) { Fawe.debug("You need to update PlotSquared to access the CFI and REPLACEALL commands"); } +*/ } public static String getName(UUID uuid) { @@ -114,7 +114,7 @@ public class PlotSquaredFeature extends FaweMaskManager { } } } - if (regions == null || regions.size() == 0) { + if (regions.size() == 0) { return null; } PlotArea area = pp.getApplicablePlotArea(); diff --git a/worldedit-core/src/main/java/com/boydti/fawe/regions/general/plot/ReplaceAll.java b/worldedit-core/src/main/java/com/boydti/fawe/regions/general/plot/ReplaceAll.java index 80aa7e704..c9ae5e367 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/regions/general/plot/ReplaceAll.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/regions/general/plot/ReplaceAll.java @@ -1,3 +1,4 @@ +/* package com.boydti.fawe.regions.general.plot; import com.boydti.fawe.object.FawePlayer; @@ -45,37 +46,30 @@ public class ReplaceAll extends Command { plot.addRunning(); FawePlayer fp = FawePlayer.wrap(player.getName()); Captions.TASK_START.send(player); - TaskManager.IMP.async(new Runnable() { - @Override - public void run() { - fp.runAction(new Runnable() { - @Override - public void run() { - String worldName = plot.getWorldName(); - TaskManager.IMP.sync(new RunnableVal() { - @Override - public void run(Object value) { - SetupUtils.manager.unload(worldName, true); - } - }); - FakePlayer actor = FakePlayer.getConsole(); - String cmd = "/replaceallpattern " + worldName + " " + StringMan.join(args, " "); - CommandEvent event = new CommandEvent(actor, cmd); - CommandManager.getInstance().handleCommandOnCurrentThread(event); - TaskManager.IMP.sync(new RunnableVal() { - @Override - public void run(Object value) { - plot.teleportPlayer(player); - } - }); - plot.removeRunning(); - } - }, true, false); - } - }); + TaskManager.IMP.async(() -> fp.runAction(() -> { + String worldName = plot.getWorldName(); + TaskManager.IMP.sync(new RunnableVal() { + @Override + public void run(Object value) { + SetupUtils.manager.unload(worldName, true); + } + }); + FakePlayer actor = FakePlayer.getConsole(); + String cmd = "/replaceallpattern " + worldName + " " + StringMan.join(args, " "); + CommandEvent event = new CommandEvent(actor, cmd); + CommandManager.getInstance().handleCommandOnCurrentThread(event); + TaskManager.IMP.sync(new RunnableVal() { + @Override + public void run(Object value) { + plot.teleportPlayer(player); + } + }); + plot.removeRunning(); + }, true, false)); } else { player.sendMessage("Must have the `worlds` component enabled in the PlotSquared config.yml"); return; } } -} \ No newline at end of file +} +*/