Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
6d574bd89d
Commit
5ec0fc20e6
@ -425,6 +425,8 @@ public class PacketProcessor {
|
|||||||
|
|
||||||
private void pasteSchem(FightTeam team) throws IOException {
|
private void pasteSchem(FightTeam team) throws IOException {
|
||||||
int schemId = source.readInt();
|
int schemId = source.readInt();
|
||||||
|
if(schemId == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
execSync(() -> team.pasteSchem(SchematicNode.getSchematicNode(schemId)));
|
execSync(() -> team.pasteSchem(SchematicNode.getSchematicNode(schemId)));
|
||||||
}
|
}
|
||||||
@ -556,6 +558,11 @@ public class PacketProcessor {
|
|||||||
try{
|
try{
|
||||||
while(!source.isClosed() && !tickFinished){
|
while(!source.isClosed() && !tickFinished){
|
||||||
int packetType = Byte.toUnsignedInt(source.readByte());
|
int packetType = Byte.toUnsignedInt(source.readByte());
|
||||||
|
|
||||||
|
lastPackets.add(packetType);
|
||||||
|
if (lastPackets.size() > 10)
|
||||||
|
lastPackets.remove(0);
|
||||||
|
|
||||||
PacketParser parser = packetDecoder[packetType];
|
PacketParser parser = packetDecoder[packetType];
|
||||||
if(parser != null){
|
if(parser != null){
|
||||||
parser.process();
|
parser.process();
|
||||||
@ -563,9 +570,6 @@ public class PacketProcessor {
|
|||||||
Bukkit.getLogger().log(Level.SEVERE, "Unknown packet " + packetType + " recieved, closing. LastPacket: " + Arrays.toString(lastPackets.toArray()));
|
Bukkit.getLogger().log(Level.SEVERE, "Unknown packet " + packetType + " recieved, closing. LastPacket: " + Arrays.toString(lastPackets.toArray()));
|
||||||
source.close();
|
source.close();
|
||||||
}
|
}
|
||||||
lastPackets.add(packetType);
|
|
||||||
if (lastPackets.size() > 10)
|
|
||||||
lastPackets.remove(0);
|
|
||||||
}
|
}
|
||||||
} catch (EOFException e) {
|
} catch (EOFException e) {
|
||||||
Bukkit.getLogger().log(Level.INFO, "The FightServer is offline");
|
Bukkit.getLogger().log(Level.INFO, "The FightServer is offline");
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren