WorldEdit

WorldEdit

45M Downloads

WorldEdit API issue

Krystian-Kryszczak opened this issue ยท 1 comments

commented

WorldEdit Version

worldedit-bukkit-7.2.8.jar

Platform Version

paper-1.18.1-77.jar

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

System: Linux Mint

[00:31:38 INFO]: [SkyWars] Enabling SkyWars v1.0-SNAPSHOT [00:31:38 ERROR]: Error occurred while enabling SkyWars v1.0-SNAPSHOT (Is it up to date?) com.sk89q.worldedit.extension.platform.NoCapablePlatformException: Not all platforms have been registered yet! Please wait until WorldEdit is initialized. at com.sk89q.worldedit.extension.platform.PlatformManager.queryCapability(PlatformManager.java:170) ~[SkyWars.jar:?] at com.sk89q.worldedit.extent.clipboard.io.SpongeSchematicReader.read(SpongeSchematicReader.java:95) ~[SkyWars.jar:?] at net.ultimatecraft.skywars.game.Game.setMap(Game.java:139) ~[SkyWars.jar:?] at net.ultimatecraft.skywars.game.Game.create(Game.java:372) ~[SkyWars.jar:?] at net.ultimatecraft.skywars.SkyWars.loadGames(SkyWars.java:116) ~[SkyWars.jar:?] at net.ultimatecraft.skywars.SkyWars.onEnable(SkyWars.java:37) ~[SkyWars.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[paper-api-1.18.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:563) ~[paper-1.18.1.jar:git-Paper-77] at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:477) ~[paper-1.18.1.jar:git-Paper-77] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:727) ~[paper-1.18.1.jar:git-Paper-77] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:503) ~[paper-1.18.1.jar:git-Paper-77] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:313) ~[paper-1.18.1.jar:git-Paper-77] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1202) ~[paper-1.18.1.jar:git-Paper-77] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.18.1.jar:git-Paper-77] at java.lang.Thread.run(Thread.java:833) ~[?:?] [00:31:38 INFO]: [SkyWars] Disabling SkyWars v1.0-SNAPSHOT

Expected Behavior

WorldEdit should paste schematic form clipboard.

Reproduction Steps

Java Code:

(Game)
public void setMap() {
Clipboard clipboard = null;
ClipboardFormat format = ClipboardFormats.findByFile(schematic);
try (ClipboardReader reader = format.getReader(new FileInputStream(schematic))) {
clipboard = reader.read();
} catch (IOException e) {
e.printStackTrace();
}
try (EditSession editSession = worldEdit.newEditSession(BukkitAdapter.adapt(center.getWorld()))) {
Operation operation = new ClipboardHolder(clipboard).createPaste(editSession)
.to(BlockVector3.at(center.getBlockX(), center.getBlockY(), center.getBlockZ()))
.build();
Operations.complete(operation);
} catch (WorldEditException | NoCapablePlatformException | NullPointerException e) {
e.printStackTrace();
}
}

(SkyWars)
private void loadGames() {
for (Map map : gamesConfig.getConfig().getMapList("Games")) {
Game.create((String) map.get("name"), (String) map.get("display-name"), new File(getDataFolder(), "maps/" + map.get("schematic")), (short) ((int) map.get("max-players")), (short) ((int) map.get("players-needed")), LocationUtils.getLocFormString((String) map.get("center")), (short) ((int) map.get("border-distance")), LocationUtils.getLocListFormStringList((List) map.get("spawnPoints")));
}
// i trying used { bukkit runnable -> runTaskLaterthis, 52060 }, but it didn't help
}

Anything Else?

No response

commented

Use the discord for support