update
This commit is contained in:
1 parent
3f672d1819
commit
15d1c70b8c
5 files changed
+105
-101
No files matched your search
@@ -3,12 +3,11 @@ package eu.mhsl.craftattack.loginServer;
|
||||
import java.util.List;
|
||||
|
||||
public final class DialogState {
|
||||
public enum Page { secret, data, consent }
|
||||
public enum Page { data, consent }
|
||||
|
||||
private final List<Page> pages;
|
||||
private static final List<Page> pages = List.of(Page.data, Page.consent);
|
||||
private int pageIndex = 0;
|
||||
|
||||
String secret = "";
|
||||
String firstName = "";
|
||||
String secondName = "";
|
||||
String birthday = "";
|
||||
@@ -17,18 +16,10 @@ public final class DialogState {
|
||||
boolean logsAccepted = false;
|
||||
boolean rulesAccepted = false;
|
||||
|
||||
private DialogState(List<Page> pages) {
|
||||
this.pages = pages;
|
||||
}
|
||||
private DialogState() {}
|
||||
|
||||
public static DialogState create() {
|
||||
boolean isAfterStart = Main.globalConfig
|
||||
.node("server", "is-after-start")
|
||||
.getBoolean(false);
|
||||
|
||||
return new DialogState(isAfterStart
|
||||
? List.of(Page.secret, Page.data, Page.consent)
|
||||
: List.of(Page.data, Page.consent));
|
||||
return new DialogState();
|
||||
}
|
||||
|
||||
public Page currentPage() {
|
||||
@@ -58,4 +49,4 @@ public final class DialogState {
|
||||
public void previousPage() {
|
||||
pageIndex = Math.max(0, pageIndex - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user