diff --git a/config/checkstyle/import-control.xml b/config/checkstyle/import-control.xml
index c783552a9..a291b5ad5 100644
--- a/config/checkstyle/import-control.xml
+++ b/config/checkstyle/import-control.xml
@@ -44,7 +44,7 @@
-
+
diff --git a/worldedit-bukkit/build.gradle b/worldedit-bukkit/build.gradle
index 21b5bdebb..8076e2ca1 100644
--- a/worldedit-bukkit/build.gradle
+++ b/worldedit-bukkit/build.gradle
@@ -19,7 +19,8 @@ dependencies {
compile project(':worldedit-libs:bukkit')
compile 'com.sk89q:dummypermscompat:1.10'
compile 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT' // zzz
- compile "io.papermc:paperlib:1.0.1"
+ compile 'com.destroystokyo.paper:paper-api:1.13.2-R0.1-SNAPSHOT'
+ compile "io.papermc:paperlib:1.0.2"
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.8.1'
compile 'org.bstats:bstats-bukkit:1.4'
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
@@ -53,7 +54,7 @@ shadowJar {
include(dependency("org.bstats:bstats-bukkit:1.4"))
}
relocate ("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") {
- include(dependency("io.papermc:paperlib:1.0.1"))
+ include(dependency("io.papermc:paperlib:1.0.2"))
}
}
}
diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java
index d02bd1abc..b8418d03d 100644
--- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java
+++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java
@@ -151,7 +151,7 @@ public class BukkitAdapter {
if (match != null) {
return match;
} else {
- throw new IllegalArgumentException("Can't find a Bukkit world for " + world);
+ throw new IllegalArgumentException("Can't find a Bukkit world for " + world.getName());
}
}
}
diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java
index 1fb7633bf..570ef30be 100644
--- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java
+++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java
@@ -49,6 +49,7 @@ import com.sk89q.worldedit.world.gamemode.GameModes;
import com.sk89q.worldedit.world.item.ItemCategory;
import com.sk89q.worldedit.world.item.ItemType;
import com.sk89q.worldedit.world.weather.WeatherTypes;
+import io.papermc.lib.PaperLib;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.Material;
@@ -75,6 +76,7 @@ import java.io.InputStream;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.Optional;
import java.util.jar.JarFile;
import java.util.logging.Level;
import java.util.zip.ZipEntry;
@@ -122,6 +124,10 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
// Now we can register events
getServer().getPluginManager().registerEvents(new WorldEditListener(this), this);
+ // register async tab complete, if available
+ if (PaperLib.isPaper()) {
+ getServer().getPluginManager().registerEvents(new AsyncTabCompleteListener(), this);
+ }
// register this so we can load world-dependent data right as the first world is loading
if (worldInitListener != null) {
@@ -138,6 +144,7 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
// Enable metrics
new Metrics(this);
+ PaperLib.suggestPaper(this);
}
private void setupWorldData() {
@@ -171,11 +178,12 @@ public class WorldEditPlugin extends JavaPlugin implements TabCompleter {
).toImmutableState();
BlockState defaultState = blockState.getBlockType().getAllStates().get(0);
for (Map.Entry, Object> propertyObjectEntry : state.getStates().entrySet()) {
- defaultState = defaultState.with((Property) propertyObjectEntry.getKey(), propertyObjectEntry.getValue());
+ //noinspection unchecked
+ defaultState = defaultState.with((Property