Archiviert
1
0

Rebase onto master

Dieser Commit ist enthalten in:
yoyosource 2022-06-01 23:19:30 +02:00 committet von Lixfel
Ursprung e7b7cc01bc
Commit 4d8771eba1
3 geänderte Dateien mit 11 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -81,9 +81,12 @@ public class EventCommand extends BasicCommand {
if(now.isBefore(e.getDeadline().toInstant())) {
Message.send("EVENT_COMING_DEADLINE", player, e.getDeadline());
}
SchematicType schematicType = SchematicType.get(e);
if (schematicType != null && schematicType.deadline() != null && now.isBefore(schematicType.deadline().toInstant())) {
Message.send("EVENT_COMING_SCHEM_DEADLINE", player, e.getDeadline());
String checkType = e.getCheckType();
if (checkType != null) {
SchematicType schematicType = SchematicType.fromDB(checkType);
if (schematicType != null && schematicType.deadline() != null && now.isBefore(schematicType.deadline().toInstant())) {
Message.send("EVENT_COMING_SCHEM_DEADLINE", player, e.getDeadline());
}
}
if(!teams.isEmpty()){
StringBuilder tline = new StringBuilder();

Datei anzeigen

@ -41,6 +41,7 @@ public class Event {
private final boolean publicSchemsOnly;
private final boolean spectateSystem;
private final Timestamp deadline;
private final String checkType;
private static Event current = null;
@ -53,6 +54,7 @@ public class Event {
this.publicSchemsOnly = rs.getBoolean("PublicSchemsOnly");
this.spectateSystem = rs.getBoolean("SpectateSystem");
this.deadline = rs.getTimestamp("Deadline");
this.checkType = rs.getString("CheckType");
}
public static Event get(){
@ -123,4 +125,7 @@ public class Event {
public Timestamp getDeadline() {
return deadline;
}
public String getCheckType() {
return checkType;
}
}

Datei anzeigen

@ -37,7 +37,6 @@ public class SchematicType {
private static final Map<String, SchematicType> fromDB;
private static final Map<SchematicType, SchematicType> fightType;
private static final List<SchematicType> types;
private static final Map<Integer, SchematicType> eventSchematicTypes;
static {
File folder = new File(ProxyServer.getInstance().getPluginsFolder(), "FightSystem");
@ -106,7 +105,6 @@ public class SchematicType {
fromDB = Collections.unmodifiableMap(tmpFromDB);
fightType = Collections.unmodifiableMap(tmpFightType);
types = Collections.unmodifiableList(tmpTypes);
eventSchematicTypes = Collections.unmodifiableMap(tmpEventType);
}
private final String name;
@ -177,10 +175,6 @@ public class SchematicType {
return types;
}
public static SchematicType get(Event event) {
return eventSchematicTypes.get(event.getEventID());
}
enum Type{
NORMAL,
CHECK_TYPE,