From 94f91840941a84a74c267df7ac19ef9d4c1b7a6f Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 7 Jun 2022 20:48:20 +0200 Subject: [PATCH] Update Network Protocol --- .../schematicsystem/commands/SchematicCommandUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java index d0fd9e8..18b3140 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/SchematicCommandUtils.java @@ -19,9 +19,10 @@ package de.steamwar.schematicsystem.commands; -import de.steamwar.comms.packets.PrepareSchemPacket; import de.steamwar.inventory.SWInventory; import de.steamwar.inventory.SWItem; +import de.steamwar.network.NetworkSender; +import de.steamwar.network.packets.client.PrepareSchemPacket; import de.steamwar.providers.BauServerInfo; import de.steamwar.schematicsystem.AutoCheckResult; import de.steamwar.schematicsystem.CheckSchemType; @@ -37,7 +38,6 @@ import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.Bukkit; import org.bukkit.entity.Player; -import java.time.format.DateTimeFormatter; import java.util.*; import java.util.function.IntFunction; import java.util.function.UnaryOperator; @@ -410,7 +410,7 @@ public class SchematicCommandUtils { if (extend == null) { submitSchemGUI(player, node, type); } else if (extend == SchematicCommand.Extend.AUSFAHREN) { - new PrepareSchemPacket(SteamwarUser.get(player.getUniqueId()), node, type).send(player); + NetworkSender.send(new PrepareSchemPacket(SteamwarUser.get(player.getUniqueId()).getId(), node.getId(), type.toDB())); SchematicSystem.MESSAGE.send("UTIL_TYPE_EXTEND", player); } } @@ -432,7 +432,7 @@ public class SchematicCommandUtils { player.closeInventory(); }); inv.setItem(8, SWItem.getDye(10), (byte) 10, SchematicSystem.MESSAGE.parse("UTIL_SUBMIT_EXTEND", player), click -> { - new PrepareSchemPacket(SteamwarUser.get(player.getUniqueId()), node, type).send(player); + NetworkSender.send(new PrepareSchemPacket(SteamwarUser.get(player.getUniqueId()).getId(), node.getId(), type.toDB())); SchematicSystem.MESSAGE.send("UTIL_SUBMIT_EXTEND_DONE", player); player.closeInventory(); });