-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
77 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/main/java/de/webalf/slotbot/model/annotations/EventFieldDefault.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.webalf.slotbot.model.annotations; | ||
|
||
import org.atteo.classindex.IndexAnnotated; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* @author Alf | ||
* @since 15.05.2021 | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target(ElementType.TYPE) | ||
@IndexAnnotated | ||
public @interface EventFieldDefault { | ||
String eventTypeName(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/de/webalf/slotbot/util/eventfield/OptKampagneFieldUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package de.webalf.slotbot.util.eventfield; | ||
|
||
import de.webalf.slotbot.model.annotations.EventFieldDefault; | ||
import de.webalf.slotbot.model.dtos.EventFieldDefaultDto; | ||
import lombok.experimental.UtilityClass; | ||
|
||
import java.util.List; | ||
|
||
import static de.webalf.slotbot.model.enums.EventFieldType.BOOLEAN; | ||
import static de.webalf.slotbot.model.enums.EventFieldType.TEXT; | ||
|
||
/** | ||
* @author Alf | ||
* @since 14.05.2021 | ||
*/ | ||
@UtilityClass | ||
@EventFieldDefault(eventTypeName = "OPT Kampagne") | ||
public class OptKampagneFieldUtils { | ||
@SuppressWarnings("unused") //EventFieldUtils#eventTypeNameToFieldDefaults | ||
static final List<EventFieldDefaultDto> FIELDS = List.of( | ||
EventFieldDefaultDto.builder().title("Karte").type(TEXT).text("Livonia").build(), | ||
EventFieldDefaultDto.builder().title("Modpack").type(TEXT) | ||
.text("https://opt4.net/forum/index.php?thread/219-wie-bekomme-ich-die-n%C3%B6tigen-mods-zum-mitspielen").build(), | ||
EventFieldDefaultDto.builder().title("Respawn").type(BOOLEAN).text("true").build() | ||
); | ||
} |