SteamWar/SpigotCore
Archiviert
13
0

Merge branch 'master' into TPS

Dieser Commit ist enthalten in:
Lixfel 2020-11-07 11:01:45 +01:00
Commit 00c7ce90a8
3 geänderte Dateien mit 32 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -23,6 +23,7 @@ public class PacketIdManager {
//0x0(X) Standalone Packets //0x0(X) Standalone Packets
public final static byte PING_PACKET = 0x01; public final static byte PING_PACKET = 0x01;
public final static byte TABLIST_NAME = 0x02;
//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

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