From 659ed09bf18ce51f6f142f933b8d75921ac30faa Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 16 Aug 2018 00:04:16 +1000 Subject: [PATCH] Fix compile --- build.gradle | 10 ++++------ .../boydti/fawe/bukkit/filter/WorldGuardFilter.java | 4 +++- .../com/boydti/fawe/bukkit/wrapper/AsyncBlock.java | 1 - .../boydti/fawe/object/pattern/ExistingPattern.java | 3 ++- .../src/main/java/com/boydti/fawe/util/MathMan.java | 2 +- .../src/main/java/com/sk89q/worldedit/Vector.java | 1 + .../com/sk89q/worldedit/function/mask/BlockMask.java | 2 -- .../com/sk89q/worldedit/util/YAMLConfiguration.java | 1 - 8 files changed, 11 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 3e93464aa..0117fa686 100644 --- a/build.gradle +++ b/build.gradle @@ -21,11 +21,6 @@ buildscript { } } -allprojects { - group = 'com.sk89q.worldedit' - version = '7.0.0-SNAPSHOT' -} - apply plugin: 'java' clean { delete "target" } @@ -50,9 +45,10 @@ ext { } } -version = date + revision + buildNumber if ( project.hasProperty("lzNoVersion") ) { // gradle build -PlzNoVersion version = "unknown" +} else { + version = date + revision + buildNumber } description = """FastAsyncWorldEdit""" @@ -68,7 +64,9 @@ subprojects { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 + version = rootProject.version + group = 'com.boydti.fawe' repositories { mavenCentral() diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/filter/WorldGuardFilter.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/filter/WorldGuardFilter.java index a26687528..e9b8a6bf3 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/filter/WorldGuardFilter.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/filter/WorldGuardFilter.java @@ -1,10 +1,12 @@ package com.boydti.fawe.bukkit.filter; import com.boydti.fawe.Fawe; +import com.boydti.fawe.FaweAPI; import com.boydti.fawe.object.RunnableVal; import com.boydti.fawe.regions.general.CuboidRegionFilter; import com.boydti.fawe.util.TaskManager; import com.sk89q.worldedit.BlockVector; +import com.sk89q.worldguard.WorldGuard; import com.sk89q.worldguard.bukkit.WorldGuardPlugin; import com.sk89q.worldguard.protection.ApplicableRegionSet; import com.sk89q.worldguard.protection.managers.RegionManager; @@ -29,7 +31,7 @@ public class WorldGuardFilter extends CuboidRegionFilter { TaskManager.IMP.sync(new RunnableVal() { @Override public void run(Object value) { - WorldGuardFilter.this.manager = WorldGuardPlugin.inst().getRegionManager(world); + WorldGuardFilter.this.manager = WorldGuard.getInstance().getPlatform().getRegionContainer().get(FaweAPI.getWorld(world.getName())); for (ProtectedRegion region : manager.getRegions().values()) { BlockVector min = region.getMinimumPoint(); BlockVector max = region.getMaximumPoint(); diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java index 49634459f..849b50609 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java @@ -6,7 +6,6 @@ import com.boydti.fawe.bukkit.wrapper.state.AsyncSign; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.TaskManager; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.blocks.BlockID; import java.util.Collection; import java.util.List; import java.util.function.Supplier; diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/pattern/ExistingPattern.java b/worldedit-core/src/main/java/com/boydti/fawe/object/pattern/ExistingPattern.java index 6a1dd2aba..2acb45d6c 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/pattern/ExistingPattern.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/pattern/ExistingPattern.java @@ -6,6 +6,7 @@ import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.world.block.BlockStateHolder; +import com.sk89q.worldedit.world.block.BlockTypes; public class ExistingPattern extends AbstractExtentPattern { public ExistingPattern(Extent extent) { @@ -19,7 +20,7 @@ public class ExistingPattern extends AbstractExtentPattern { @Override public boolean apply(Extent extent, Vector set, Vector get) throws WorldEditException { - if (set.getBlockX() == get.getBlockX() && set.getBlockZ() == get.getBlockZ() && set.getBlockY() == get.getBlockY()) { + if (set.equals(get)) { return false; } return extent.setBlock(set, extent.getBlock(get)); diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/MathMan.java b/worldedit-core/src/main/java/com/boydti/fawe/util/MathMan.java index 80fb3b147..64eabfc60 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/MathMan.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/MathMan.java @@ -353,7 +353,7 @@ public class MathMan { return x; } - public static final boolean isInteger(String str) { + public static final boolean isInteger(CharSequence str) { if (str == null) { return false; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/Vector.java b/worldedit-core/src/main/java/com/sk89q/worldedit/Vector.java index 1d6346e91..8ce05ce2d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/Vector.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/Vector.java @@ -818,6 +818,7 @@ public class Vector extends Vector2D implements Comparable, Serializable @Override public boolean equals(Object obj) { + if (obj == this) return true; if (!(obj instanceof Vector)) { return false; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockMask.java b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockMask.java index dc1ef5b03..d4c802a55 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockMask.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/function/mask/BlockMask.java @@ -139,7 +139,6 @@ public class BlockMask extends AbstractExtentMask { if (other instanceof SingleBlockTypeMask) { return new BlockMaskBuilder(bitSets).filter(((SingleBlockTypeMask) other).getBlockType()).build(getExtent()); } - // TODO FIXME BlockTypeMask return null; } @@ -164,7 +163,6 @@ public class BlockMask extends AbstractExtentMask { if (other instanceof SingleBlockTypeMask) { return new BlockMaskBuilder(bitSets).add(((SingleBlockTypeMask) other).getBlockType()).build(getExtent()); } - // TODO FIXME BlockTypeMask return null; } diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java index ef1fa87b0..b9495b8db 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java @@ -56,7 +56,6 @@ public class YAMLConfiguration extends LocalConfiguration { logger.log(Level.WARNING, "Error loading WorldEdit configuration", e); } - // TODO FIXME use Config class with comments / bindings profile = config.getBoolean("debug", profile); wandItem = ItemTypes.parse(config.getString("wand-item", wandItem.getId()));