13
0

Fix Schem check-schemloading in 1.12
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2023-02-06 00:02:32 +01:00
Ursprung 13e1646477
Commit d34c5b2583

Datei anzeigen

@ -600,7 +600,7 @@ public class SchematicCommand extends SWCommand {
@Register(value = {"check", "clipboard"}) @Register(value = {"check", "clipboard"})
public void checkClipboardCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) { public void checkClipboardCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) {
try { try {
check(player, WorldEdit.getInstance().getSessionManager().get(new BukkitPlayer(player)).getClipboard().getClipboard(), type, "clipboard", false); check(player, WorldEdit.getInstance().getSessionManager().findByName(player.getName()).getClipboard().getClipboard(), type, "clipboard", false);
} catch (EmptyClipboardException e) { } catch (EmptyClipboardException e) {
SchematicSystem.MESSAGE.send("COMMAND_CHECK_CLIPBOARD_EMPTY", player); SchematicSystem.MESSAGE.send("COMMAND_CHECK_CLIPBOARD_EMPTY", player);
} }
@ -609,7 +609,7 @@ public class SchematicCommand extends SWCommand {
@Register(value = {"check", "selection"}) @Register(value = {"check", "selection"})
public void checkSelectionCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) { public void checkSelectionCommand(Player player, @ErrorMessage("UTIL_CHECK_TYPE_NOT_FOUND") CheckSchemType type) {
try { try {
Clipboard clipboard = new BlockArrayClipboard(WorldEdit.getInstance().getSessionManager().get(new BukkitPlayer(player)).getSelection(new BukkitWorld(player.getWorld()))); Clipboard clipboard = new BlockArrayClipboard(WorldEdit.getInstance().getSessionManager().findByName(player.getName()).getSelection(new BukkitWorld(player.getWorld())));
EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(player.getWorld()), -1); EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(new BukkitWorld(player.getWorld()), -1);
Operations.complete(new ForwardExtentCopy(editSession, clipboard.getRegion(), clipboard, clipboard.getMinimumPoint())); Operations.complete(new ForwardExtentCopy(editSession, clipboard.getRegion(), clipboard, clipboard.getMinimumPoint()));
@ -630,7 +630,7 @@ public class SchematicCommand extends SWCommand {
} }
Clipboard clipboard; Clipboard clipboard;
try { try {
clipboard = WorldEdit.getInstance().getSessionManager().get(new BukkitPlayer(player)).getClipboard().getClipboard(); clipboard = WorldEdit.getInstance().getSessionManager().findByName(player.getName()).getClipboard().getClipboard();
} catch (EmptyClipboardException e) { } catch (EmptyClipboardException e) {
SchematicSystem.MESSAGE.send("COMMAND_CHECK_CLIPBOARD_EMPTY", player); SchematicSystem.MESSAGE.send("COMMAND_CHECK_CLIPBOARD_EMPTY", player);
return; return;