Commits vergleichen
11 Commits
new-packet
...
master
Autor | SHA1 | Datum | |
---|---|---|---|
c702acb9d8 | |||
|
14bea165c5 | ||
|
d000b8687d | ||
|
1237a699ba | ||
|
e76473e0be | ||
|
0caf885959 | ||
20c22c47f9 | |||
0c35be1fec | |||
|
0bc349fc64 | ||
a473e59048 | |||
3c889efe9e |
10
build.gradle
10
build.gradle
@ -74,15 +74,15 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.projectlombok:lombok:1.18.22'
|
||||
testCompileOnly 'org.projectlombok:lombok:1.18.22'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
|
||||
compileOnly 'org.projectlombok:lombok:1.18.32'
|
||||
testCompileOnly 'org.projectlombok:lombok:1.18.32'
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.32'
|
||||
testAnnotationProcessor 'org.projectlombok:lombok:1.18.32'
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.hamcrest:hamcrest:2.2'
|
||||
|
||||
compileOnly 'org.xerial:sqlite-jdbc:3.36.0'
|
||||
compileOnly 'org.xerial:sqlite-jdbc:3.46.0.0'
|
||||
}
|
||||
|
||||
task buildResources {
|
||||
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.network.packets.api;
|
||||
|
||||
import de.steamwar.network.packets.NetworkPacket;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Getter
|
||||
public class BauStatusRequestPacket extends NetworkPacket {
|
||||
private static final long serialVersionUID = 1442956004669738962L;
|
||||
private int playerId;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.network.packets.api;
|
||||
|
||||
import de.steamwar.network.packets.NetworkPacket;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EventReloadPacket extends NetworkPacket {
|
||||
|
||||
private static final long serialVersionUID = 1814658967167959572L;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.network.packets.client;
|
||||
|
||||
import de.steamwar.network.packets.NetworkPacket;
|
||||
|
||||
public class AnvilInventoryCallbackPacket extends NetworkPacket {
|
||||
|
||||
private static final long serialVersionUID = 9000793526796115661L;
|
||||
private int player;
|
||||
private String text;
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.network.packets.server;
|
||||
|
||||
import de.steamwar.network.packets.NetworkPacket;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Getter
|
||||
public class AnvilInventoryPacket extends NetworkPacket {
|
||||
|
||||
private static final long serialVersionUID = -2283899431463763871L;
|
||||
|
||||
private String title;
|
||||
private int player;
|
||||
private String defaultText;
|
||||
private String item;
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2024 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.network.packets.server.api;
|
||||
|
||||
import de.steamwar.network.packets.NetworkPacket;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Getter
|
||||
public class BauStatusResponsePacket extends NetworkPacket {
|
||||
private static final long serialVersionUID = 4338519342870271560L;
|
||||
|
||||
private int player;
|
||||
private boolean serverStatus;
|
||||
private List<Integer> onlinePlayers;
|
||||
}
|
@ -87,6 +87,7 @@ public class Event {
|
||||
private final SchematicType schemType;
|
||||
@Field
|
||||
private final boolean publicSchemsOnly;
|
||||
@Deprecated
|
||||
@Field
|
||||
private final boolean spectateSystem;
|
||||
|
||||
|
@ -84,8 +84,12 @@ public class EventFight implements Comparable<EventFight> {
|
||||
private final int teamRed;
|
||||
@Getter
|
||||
@Field
|
||||
@Deprecated
|
||||
private final int kampfleiter;
|
||||
@Getter
|
||||
@Field
|
||||
private final int spectatePort;
|
||||
@Getter
|
||||
@Field(def = "0")
|
||||
private int ergebnis;
|
||||
@Field(nullable = true)
|
||||
@ -103,7 +107,7 @@ public class EventFight implements Comparable<EventFight> {
|
||||
}
|
||||
|
||||
public boolean hasFinished() {
|
||||
return fight != 0;
|
||||
return fight != 0 || ergebnis != 0;
|
||||
}
|
||||
|
||||
public void reschedule() {
|
||||
|
@ -31,7 +31,7 @@ import java.util.stream.Collectors;
|
||||
public class Referee {
|
||||
|
||||
private static final Table<Referee> table = new Table<>(Referee.class);
|
||||
private static final SelectStatement<Referee> byEvent = table.select("eventID");
|
||||
private static final SelectStatement<Referee> byEvent = table.selectFields("eventID");
|
||||
|
||||
public static Set<Integer> get(int eventID) {
|
||||
return byEvent.listSelect(eventID).stream().map(referee -> referee.userID).collect(Collectors.toSet());
|
||||
|
@ -38,7 +38,7 @@ public class SWException {
|
||||
private static final String SERVER_NAME = new File(CWD).getName();
|
||||
|
||||
private static final Table<SWException> table = new Table<>(SWException.class, "Exception");
|
||||
private static final Statement insert = table.insertFields("server", "message", "stacktrace");
|
||||
private static final Statement insert = table.insertFields(true, "server", "message", "stacktrace");
|
||||
|
||||
@Field(keys = {Table.PRIMARY}, autoincrement = true)
|
||||
private final int id;
|
||||
@ -52,10 +52,17 @@ public class SWException {
|
||||
private final String stacktrace;
|
||||
|
||||
public static void log(String message, String stacktrace){
|
||||
insert.update(SERVER_NAME, generateMessage(message), stacktrace);
|
||||
}
|
||||
|
||||
public static int logGetId(String message, String stacktrace) {
|
||||
return insert.insertGetKey(SERVER_NAME, generateMessage(message), stacktrace);
|
||||
}
|
||||
|
||||
private static String generateMessage(String message) {
|
||||
StringBuilder msgBuilder = new StringBuilder(message);
|
||||
SQLWrapper.impl.additionalExceptionMetadata(msgBuilder);
|
||||
msgBuilder.append("\nCWD: ").append(CWD);
|
||||
|
||||
insert.update(SERVER_NAME, msgBuilder.toString(), stacktrace);
|
||||
return msgBuilder.toString();
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ public enum UserPerm {
|
||||
RESTRICTED_MODS,
|
||||
COLOR_CHAT,
|
||||
TEAM,
|
||||
TICKET_LOG,
|
||||
BUILD,
|
||||
CHECK,
|
||||
MODERATION,
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren