From 9df919de52837dd6a4e1947fadfb875ab9ce378e Mon Sep 17 00:00:00 2001 From: Yaruma3341 Date: Thu, 28 Mar 2019 14:52:53 +0100 Subject: [PATCH] reworked some methods Signed-off-by: yaruma3341 --- .../warking/schematicsystem/commands/SchematicCommand.java | 6 ++++-- src/plugin.yml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/de/warking/schematicsystem/commands/SchematicCommand.java b/src/de/warking/schematicsystem/commands/SchematicCommand.java index 30aa68e..2fa7aee 100644 --- a/src/de/warking/schematicsystem/commands/SchematicCommand.java +++ b/src/de/warking/schematicsystem/commands/SchematicCommand.java @@ -1,6 +1,7 @@ package de.warking.schematicsystem.commands; import com.boydti.fawe.FaweAPI; +import com.sk89q.worldedit.extension.platform.Actor; import com.sk89q.worldedit.session.ClipboardHolder; import de.warking.hunjy.MySQL.Schematic; import de.warking.schematicsystem.SchematicSystem; @@ -52,7 +53,8 @@ public class SchematicCommand implements CommandExecutor { //load schematic to player clipboard try { - SchematicSystem.getWorldEditPlugin().getSession(player).setClipboard((ClipboardHolder) FaweAPI.load(new File(SchematicSystem.PREFIX + args[1])).getClipboard()); + Actor actor = SchematicSystem.getWorldEditPlugin().wrapCommandSender(sender); + SchematicSystem.getWorldEditPlugin().getWorldEdit().getSessionManager().get(actor).setClipboard((ClipboardHolder) FaweAPI.load(new File(SchematicSystem.PREFIX + args[1])).getClipboard()); player.sendMessage(SchematicSystem.PREFIX + "Schematic §6" + args[1] + " §7geladen."); } catch (IOException ex) { ex.printStackTrace(); @@ -73,7 +75,7 @@ public class SchematicCommand implements CommandExecutor { } if(args[0].equalsIgnoreCase("save")) { - //save schematic + //Save schematic } break; } diff --git a/src/plugin.yml b/src/plugin.yml index 189aae7..dc24153 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,5 +1,6 @@ name: SchematicSystem version: 1.0 author: [Yaruma3341, Lixfel] +depend: [CoreSystem, WorldEdit, FastAsyncWorldEdit] main: de.warking.schematicsystem.SchematicSystem \ No newline at end of file