Rebase onto master
Dieser Commit ist enthalten in:
Ursprung
e7b7cc01bc
Commit
4d8771eba1
@ -81,9 +81,12 @@ public class EventCommand extends BasicCommand {
|
|||||||
if(now.isBefore(e.getDeadline().toInstant())) {
|
if(now.isBefore(e.getDeadline().toInstant())) {
|
||||||
Message.send("EVENT_COMING_DEADLINE", player, e.getDeadline());
|
Message.send("EVENT_COMING_DEADLINE", player, e.getDeadline());
|
||||||
}
|
}
|
||||||
SchematicType schematicType = SchematicType.get(e);
|
String checkType = e.getCheckType();
|
||||||
if (schematicType != null && schematicType.deadline() != null && now.isBefore(schematicType.deadline().toInstant())) {
|
if (checkType != null) {
|
||||||
Message.send("EVENT_COMING_SCHEM_DEADLINE", player, e.getDeadline());
|
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()){
|
if(!teams.isEmpty()){
|
||||||
StringBuilder tline = new StringBuilder();
|
StringBuilder tline = new StringBuilder();
|
||||||
|
@ -41,6 +41,7 @@ public class Event {
|
|||||||
private final boolean publicSchemsOnly;
|
private final boolean publicSchemsOnly;
|
||||||
private final boolean spectateSystem;
|
private final boolean spectateSystem;
|
||||||
private final Timestamp deadline;
|
private final Timestamp deadline;
|
||||||
|
private final String checkType;
|
||||||
|
|
||||||
private static Event current = null;
|
private static Event current = null;
|
||||||
|
|
||||||
@ -53,6 +54,7 @@ public class Event {
|
|||||||
this.publicSchemsOnly = rs.getBoolean("PublicSchemsOnly");
|
this.publicSchemsOnly = rs.getBoolean("PublicSchemsOnly");
|
||||||
this.spectateSystem = rs.getBoolean("SpectateSystem");
|
this.spectateSystem = rs.getBoolean("SpectateSystem");
|
||||||
this.deadline = rs.getTimestamp("Deadline");
|
this.deadline = rs.getTimestamp("Deadline");
|
||||||
|
this.checkType = rs.getString("CheckType");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Event get(){
|
public static Event get(){
|
||||||
@ -123,4 +125,7 @@ public class Event {
|
|||||||
public Timestamp getDeadline() {
|
public Timestamp getDeadline() {
|
||||||
return deadline;
|
return deadline;
|
||||||
}
|
}
|
||||||
|
public String getCheckType() {
|
||||||
|
return checkType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ public class SchematicType {
|
|||||||
private static final Map<String, SchematicType> fromDB;
|
private static final Map<String, SchematicType> fromDB;
|
||||||
private static final Map<SchematicType, SchematicType> fightType;
|
private static final Map<SchematicType, SchematicType> fightType;
|
||||||
private static final List<SchematicType> types;
|
private static final List<SchematicType> types;
|
||||||
private static final Map<Integer, SchematicType> eventSchematicTypes;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
File folder = new File(ProxyServer.getInstance().getPluginsFolder(), "FightSystem");
|
File folder = new File(ProxyServer.getInstance().getPluginsFolder(), "FightSystem");
|
||||||
@ -106,7 +105,6 @@ public class SchematicType {
|
|||||||
fromDB = Collections.unmodifiableMap(tmpFromDB);
|
fromDB = Collections.unmodifiableMap(tmpFromDB);
|
||||||
fightType = Collections.unmodifiableMap(tmpFightType);
|
fightType = Collections.unmodifiableMap(tmpFightType);
|
||||||
types = Collections.unmodifiableList(tmpTypes);
|
types = Collections.unmodifiableList(tmpTypes);
|
||||||
eventSchematicTypes = Collections.unmodifiableMap(tmpEventType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
@ -177,10 +175,6 @@ public class SchematicType {
|
|||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SchematicType get(Event event) {
|
|
||||||
return eventSchematicTypes.get(event.getEventID());
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Type{
|
enum Type{
|
||||||
NORMAL,
|
NORMAL,
|
||||||
CHECK_TYPE,
|
CHECK_TYPE,
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren