Archiviert
1
0

Update some stuff

Dieser Commit ist enthalten in:
yoyosource 2022-06-01 23:19:30 +02:00
Ursprung abc775009e
Commit e61a98c2a3
4 geänderte Dateien mit 12 neuen und 10 gelöschten Zeilen

@ -1 +1 @@
Subproject commit 0f03b57e437c1d843816b7202d95b79ff0a8d2df
Subproject commit 919c4d525ea39756b24bd961bb72d8d58bdd5bd4

Datei anzeigen

@ -81,10 +81,13 @@ public class EventCommand extends BasicCommand {
if(now.isBefore(e.getDeadline().toInstant())) {
Message.send("EVENT_COMING_DEADLINE", player, e.getDeadline());
}
SchematicType schematicType = SchematicType.get(e);
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();
for(Team t : teams){

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,