SteamWar/SpigotCore
Archiviert
13
0

Baumember update packet

Dieser Commit ist enthalten in:
Lixfel 2021-05-19 18:08:40 +02:00
Ursprung b71bc98a41
Commit cbf062ae47
3 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -51,6 +51,7 @@ public class BungeeReceiver implements PluginMessageListener {
} }
}); });
registerHandler(PacketIdManager.BAUMEMBER_UPDATE, byteArrayDataInput -> BauweltMember.clear());
registerHandler(PacketIdManager.INVENTORY_PACKET, new InventoryHandler()); registerHandler(PacketIdManager.INVENTORY_PACKET, new InventoryHandler());
registerHandler(PacketIdManager.INVENTORY_CLOSE_PACKET, byteArrayDataInput -> { registerHandler(PacketIdManager.INVENTORY_CLOSE_PACKET, byteArrayDataInput -> {
Player player = Bukkit.getPlayer(SteamwarUser.get(byteArrayDataInput.readInt()).getUUID()); Player player = Bukkit.getPlayer(SteamwarUser.get(byteArrayDataInput.readInt()).getUUID());

Datei anzeigen

@ -25,6 +25,7 @@ public class PacketIdManager {
public final static byte PING_PACKET = 0x01; public final static byte PING_PACKET = 0x01;
public final static byte TABLIST_NAME = 0x02; public final static byte TABLIST_NAME = 0x02;
public static final byte PREPARE_SCHEM = 0x03; public static final byte PREPARE_SCHEM = 0x03;
public final static byte BAUMEMBER_UPDATE = 0x04;
//0x1(X) Bungee Inventory //0x1(X) Bungee Inventory
public final static byte INVENTORY_PACKET = 0x10; public final static byte INVENTORY_PACKET = 0x10;
public final static byte INVENTORY_CALLBACK_PACKET = 0x11; public final static byte INVENTORY_CALLBACK_PACKET = 0x11;

Datei anzeigen

@ -34,6 +34,10 @@ public class BauweltMember{
private static final List<BauweltMember> members = new ArrayList<>(); private static final List<BauweltMember> members = new ArrayList<>();
public static void clear() {
members.clear();
}
private BauweltMember(int ownerID, int memberID, boolean worldEdit, boolean world, boolean updateDB){ private BauweltMember(int ownerID, int memberID, boolean worldEdit, boolean world, boolean updateDB){
bauweltID = ownerID; bauweltID = ownerID;
this.memberID = memberID; this.memberID = memberID;