mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Changes to fix some PlotSquared compatibility issues, plus fix block Mask parsing
This commit is contained in:
parent
24fbc86cdd
commit
3ffb5ff00d
@ -189,7 +189,6 @@ public class WorldEditPlugin extends JavaPlugin //implements TabCompleter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("finished enable");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void rename() {
|
private void rename() {
|
||||||
|
@ -213,10 +213,10 @@ public class Fawe {
|
|||||||
try {
|
try {
|
||||||
transformParser = new DefaultTransformParser(getWorldEdit());
|
transformParser = new DefaultTransformParser(getWorldEdit());
|
||||||
visualQueue = new VisualQueue(3);
|
visualQueue = new VisualQueue(3);
|
||||||
// WEManager.IMP.managers.addAll(Fawe.this.IMP.getMaskManagers());
|
WEManager.IMP.managers.addAll(Fawe.this.IMP.getMaskManagers());
|
||||||
// WEManager.IMP.managers.add(new PlotSquaredFeature());
|
WEManager.IMP.managers.add(new PlotSquaredFeature());
|
||||||
// Fawe.debug("Plugin 'PlotSquared' found. Using it now.");
|
Fawe.debug("Plugin 'PlotSquared' found. Using it now.");
|
||||||
} catch (Throwable e) {e.printStackTrace();}
|
} catch (Throwable e) {}
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
TaskManager.IMP.repeat(timer, 1);
|
TaskManager.IMP.repeat(timer, 1);
|
||||||
|
@ -33,7 +33,7 @@ public class PlotSquaredFeature extends FaweMaskManager {
|
|||||||
public PlotSquaredFeature() {
|
public PlotSquaredFeature() {
|
||||||
super("PlotSquared");
|
super("PlotSquared");
|
||||||
Fawe.debug("Optimizing PlotSquared");
|
Fawe.debug("Optimizing PlotSquared");
|
||||||
PlotSquared.get().worldedit = null;
|
// PlotSquared.get().worldedit = null;
|
||||||
setupBlockQueue();
|
setupBlockQueue();
|
||||||
setupSchematicHandler();
|
setupSchematicHandler();
|
||||||
setupChunkManager();
|
setupChunkManager();
|
||||||
|
@ -542,10 +542,9 @@ public class EditSession extends AbstractDelegateExtent implements HasFaweQueue,
|
|||||||
return new NullExtent(extent, BBC.WORLDEDIT_CANCEL_REASON_MANUAL);
|
return new NullExtent(extent, BBC.WORLDEDIT_CANCEL_REASON_MANUAL);
|
||||||
}
|
}
|
||||||
final Extent toReturn = event.getExtent();
|
final Extent toReturn = event.getExtent();
|
||||||
// if(toReturn instanceof com.sk89q.worldedit.extent.NullExtent) {
|
if(toReturn instanceof com.sk89q.worldedit.extent.NullExtent) {
|
||||||
// return new NullExtent(toReturn, null);
|
return new NullExtent(toReturn, null);
|
||||||
// return new AbstractDelegateExtent(toReturn);
|
}
|
||||||
// });
|
|
||||||
if (!(toReturn instanceof AbstractDelegateExtent)) {
|
if (!(toReturn instanceof AbstractDelegateExtent)) {
|
||||||
Fawe.debug("Extent " + toReturn + " must be AbstractDelegateExtent");
|
Fawe.debug("Extent " + toReturn + " must be AbstractDelegateExtent");
|
||||||
return extent;
|
return extent;
|
||||||
|
@ -335,8 +335,7 @@ public class RegionCommands extends MethodCommands {
|
|||||||
@Logging(REGION)
|
@Logging(REGION)
|
||||||
public void set(FawePlayer player, LocalSession session, EditSession editSession, @Selection Region selection, Pattern to, CommandContext context) throws WorldEditException {
|
public void set(FawePlayer player, LocalSession session, EditSession editSession, @Selection Region selection, Pattern to, CommandContext context) throws WorldEditException {
|
||||||
player.checkConfirmationRegion(() -> {
|
player.checkConfirmationRegion(() -> {
|
||||||
int affected;
|
int affected = editSession.setBlocks(selection, to);
|
||||||
affected = editSession.setBlocks(selection, to);
|
|
||||||
if (affected != 0) {
|
if (affected != 0) {
|
||||||
BBC.OPERATION.send(player, affected);
|
BBC.OPERATION.send(player, affected);
|
||||||
if (!player.hasPermission("fawe.tips"))
|
if (!player.hasPermission("fawe.tips"))
|
||||||
|
@ -214,12 +214,12 @@ public class DefaultMaskParser extends FaweParser<Mask> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (pe.and) {
|
if (pe.and) {
|
||||||
masks.add(new ArrayList<>());
|
masks.add(new ArrayList<>());
|
||||||
}
|
}
|
||||||
masks.get(masks.size() - 1).add(mask);
|
masks.get(masks.size() - 1).add(mask);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (InputParseException rethrow) {
|
} catch (InputParseException rethrow) {
|
||||||
throw rethrow;
|
throw rethrow;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user