13
0

Update Network #121

Zusammengeführt
Lixfel hat 1 Commits von network nach master 2022-06-14 08:51:08 +02:00 zusammengeführt

Datei anzeigen

@ -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();
});