SteamWar/SpigotCore
Archiviert
13
0

Add TPSWatcher #62

Manuell gemergt
Lixfel hat 9 Commits von TPS nach master 2020-11-07 11:06:32 +01:00 zusammengeführt
3 geänderte Dateien mit 32 neuen und 0 gelöschten Zeilen
Nur Änderungen aus Commit 00c7ce90a8 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -23,6 +23,7 @@ public class PacketIdManager {
//0x0(X) Standalone Packets
public final static byte PING_PACKET = 0x01;
public final static byte TABLIST_NAME = 0x02;
//0x1(X) Bungee Inventory
public final static byte INVENTORY_PACKET = 0x10;
public final static byte INVENTORY_CALLBACK_PACKET = 0x11;

Datei anzeigen

@ -0,0 +1,26 @@
package de.steamwar.comms.packets;
import com.google.common.io.ByteArrayDataOutput;
import de.steamwar.comms.PacketIdManager;
public class TablistNamePacket extends SpigotPacket {
final int swUserId;
final String tablistName;
public TablistNamePacket(int swUserId, String tablistName){
this.swUserId = swUserId;
this.tablistName = tablistName;
}
@Override
public int getName() {
return PacketIdManager.TABLIST_NAME;
}
@Override
public void writeVars(ByteArrayDataOutput byteArrayDataOutput) {
byteArrayDataOutput.writeInt(swUserId);
byteArrayDataOutput.writeUTF(tablistName);
}
}

Datei anzeigen

@ -34,6 +34,7 @@ public class Event {
private final Timestamp end;
private final int maximumTeamMembers;
private final boolean publicSchemsOnly;
private final boolean spectateSystem;
private Event(ResultSet rs) throws SQLException{
this.eventID = rs.getInt("EventID");
@ -42,6 +43,7 @@ public class Event {
this.end = rs.getTimestamp("End");
this.maximumTeamMembers = rs.getInt("MaximumTeamMembers");
this.publicSchemsOnly = rs.getBoolean("PublicSchemsOnly");
this.spectateSystem = rs.getBoolean("SpectateSystem");
}
public static Event get(int eventID){
@ -75,4 +77,7 @@ public class Event {
public boolean publicSchemsOnly() {
return publicSchemsOnly;
}
public boolean spectateSystem(){
return spectateSystem;
}
}