Implementing prepare schem packet
Dieser Commit ist enthalten in:
Ursprung
495e468f6b
Commit
3252fae529
@ -24,6 +24,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;
|
public final static byte TABLIST_NAME = 0x02;
|
||||||
|
public static final byte PREPARE_SCHEM = 0x03;
|
||||||
//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;
|
||||||
|
@ -0,0 +1,32 @@
|
|||||||
|
package de.steamwar.comms.packets;
|
||||||
|
|
||||||
|
import com.google.common.io.ByteArrayDataOutput;
|
||||||
|
import de.steamwar.comms.PacketIdManager;
|
||||||
|
import de.steamwar.sql.Schematic;
|
||||||
|
import de.steamwar.sql.SchematicType;
|
||||||
|
import de.steamwar.sql.SteamwarUser;
|
||||||
|
|
||||||
|
public class PrepareSchemPacket extends SpigotPacket{
|
||||||
|
|
||||||
|
private final SteamwarUser user;
|
||||||
|
private final Schematic schematic;
|
||||||
|
private final SchematicType schematicType;
|
||||||
|
|
||||||
|
public PrepareSchemPacket(SteamwarUser user, Schematic schematic, SchematicType schematicType){
|
||||||
|
this.user = user;
|
||||||
|
this.schematic = schematic;
|
||||||
|
this.schematicType = schematicType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getName() {
|
||||||
|
return PacketIdManager.PREPARE_SCHEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeVars(ByteArrayDataOutput byteArrayDataOutput) {
|
||||||
|
byteArrayDataOutput.writeInt(user.getId());
|
||||||
|
byteArrayDataOutput.writeInt(schematic.getSchemID());
|
||||||
|
byteArrayDataOutput.writeUTF(schematicType.toDB());
|
||||||
|
}
|
||||||
|
}
|
10
SpigotCore_Main/src/de/steamwar/core/ServerInit.java
Normale Datei
10
SpigotCore_Main/src/de/steamwar/core/ServerInit.java
Normale Datei
@ -0,0 +1,10 @@
|
|||||||
|
package de.steamwar.core;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
|
public class ServerInit {
|
||||||
|
|
||||||
|
private static void initServer(){
|
||||||
|
Bukkit.getServer();
|
||||||
|
}
|
||||||
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren