aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/elytrium/limboauth/handler
diff options
context:
space:
mode:
authorPetr Ilin <hevav@hevav.dev>2022-02-07 07:19:15 +0300
committerPetr Ilin <hevav@hevav.dev>2022-02-07 07:19:15 +0300
commit11dc5edc485a93d05eb2485ad80b4df7afbde6d9 (patch)
tree07bcc31d0a2b8b2b6702ff2dc314eb8f2be24c6d /src/main/java/net/elytrium/limboauth/handler
parenta322bd93e4e4d22ed7805d66d1545c39de87fd38 (diff)
downloadLimboAuth-11dc5edc485a93d05eb2485ad80b4df7afbde6d9.tar.gz
LimboAuth-11dc5edc485a93d05eb2485ad80b4df7afbde6d9.tar.bz2
LimboAuth-11dc5edc485a93d05eb2485ad80b4df7afbde6d9.zip
Title settings
Diffstat (limited to 'src/main/java/net/elytrium/limboauth/handler')
-rw-r--r--src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java b/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java
index 88f393d..c4c4587 100644
--- a/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java
+++ b/src/main/java/net/elytrium/limboauth/handler/AuthSessionHandler.java
@@ -123,7 +123,8 @@ public class AuthSessionHandler implements LimboSessionHandler {
this.proxyPlayer.showTitle(
Title.title(
this.deserialize(Settings.IMP.MAIN.STRINGS.REGISTER_SUCCESSFUL_TITLE),
- this.deserialize(Settings.IMP.MAIN.STRINGS.REGISTER_SUCCESSFUL_SUBTITLE)
+ this.deserialize(Settings.IMP.MAIN.STRINGS.REGISTER_SUCCESSFUL_SUBTITLE),
+ Settings.IMP.MAIN.CRACKED_TITLE_SETTINGS.toTimes()
)
);
}
@@ -307,7 +308,8 @@ public class AuthSessionHandler implements LimboSessionHandler {
this.proxyPlayer.showTitle(
Title.title(
this.deserialize(Settings.IMP.MAIN.STRINGS.LOGIN_SUCCESSFUL_TITLE),
- this.deserialize(Settings.IMP.MAIN.STRINGS.LOGIN_SUCCESSFUL_SUBTITLE)
+ this.deserialize(Settings.IMP.MAIN.STRINGS.LOGIN_SUCCESSFUL_SUBTITLE),
+ Settings.IMP.MAIN.CRACKED_TITLE_SETTINGS.toTimes()
)
);
}
@@ -315,6 +317,10 @@ public class AuthSessionHandler implements LimboSessionHandler {
}
private void finishAuth() {
+ if (Settings.IMP.MAIN.CRACKED_TITLE_SETTINGS.CLEAR_AFTER_LOGIN) {
+ this.proxyPlayer.clearTitle();
+ }
+
this.plugin.cacheAuthUser(this.proxyPlayer);
this.player.disconnect();
}
@@ -324,14 +330,20 @@ public class AuthSessionHandler implements LimboSessionHandler {
this.proxyPlayer.sendMessage(this.deserialize(Settings.IMP.MAIN.STRINGS.TOTP));
if (sendTitle && !Settings.IMP.MAIN.STRINGS.TOTP_TITLE.isEmpty() && !Settings.IMP.MAIN.STRINGS.TOTP_SUBTITLE.isEmpty()) {
this.proxyPlayer.showTitle(
- Title.title(this.deserialize(Settings.IMP.MAIN.STRINGS.TOTP_TITLE), this.deserialize(Settings.IMP.MAIN.STRINGS.TOTP_SUBTITLE))
+ Title.title(
+ this.deserialize(Settings.IMP.MAIN.STRINGS.TOTP_TITLE),
+ this.deserialize(Settings.IMP.MAIN.STRINGS.TOTP_SUBTITLE),
+ Settings.IMP.MAIN.CRACKED_TITLE_SETTINGS.toTimes())
);
}
} else if (this.playerInfo == null) {
this.proxyPlayer.sendMessage(this.deserialize(Settings.IMP.MAIN.STRINGS.REGISTER));
if (sendTitle && !Settings.IMP.MAIN.STRINGS.REGISTER_TITLE.isEmpty() && !Settings.IMP.MAIN.STRINGS.REGISTER_SUBTITLE.isEmpty()) {
this.proxyPlayer.showTitle(
- Title.title(this.deserialize(Settings.IMP.MAIN.STRINGS.REGISTER_TITLE), this.deserialize(Settings.IMP.MAIN.STRINGS.REGISTER_SUBTITLE))
+ Title.title(
+ this.deserialize(Settings.IMP.MAIN.STRINGS.REGISTER_TITLE),
+ this.deserialize(Settings.IMP.MAIN.STRINGS.REGISTER_SUBTITLE),
+ Settings.IMP.MAIN.CRACKED_TITLE_SETTINGS.toTimes())
);
}
} else {
@@ -340,7 +352,8 @@ public class AuthSessionHandler implements LimboSessionHandler {
this.proxyPlayer.showTitle(
Title.title(
this.deserialize(MessageFormat.format(Settings.IMP.MAIN.STRINGS.LOGIN_TITLE, this.attempts)),
- this.deserialize(MessageFormat.format(Settings.IMP.MAIN.STRINGS.LOGIN_SUBTITLE, this.attempts))
+ this.deserialize(MessageFormat.format(Settings.IMP.MAIN.STRINGS.LOGIN_SUBTITLE, this.attempts)),
+ Settings.IMP.MAIN.PREMIUM_TITLE_SETTINGS.toTimes()
)
);
}