2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2025-04-20 01:27:07 +00:00

remove build date

This commit is contained in:
mohammed jasem alaajel 2024-04-28 12:38:57 +04:00
parent d0ae5d5342
commit dc56a419e7
Signed by: ham1255
GPG Key ID: EF343502046229F4
3 changed files with 7 additions and 16 deletions

View File

@ -35,7 +35,6 @@ blossom {
commit = "$commitStdout".replace("\n", "") // for some reason it adds new line so remove it. commit = "$commitStdout".replace("\n", "") // for some reason it adds new line so remove it.
commitStdout.close() commitStdout.close()
replaceToken("@git_commit@", commit) replaceToken("@git_commit@", commit)
replaceToken("@build_date@", "${Instant.now().epochSecond}")
} }

View File

@ -15,7 +15,6 @@ public class Constants {
public final static String VERSION = "@version@"; public final static String VERSION = "@version@";
public final static String GIT_COMMIT = "@git_commit@"; public final static String GIT_COMMIT = "@git_commit@";
public final static long BUILD_DATE = Long.parseLong("@build_date@");
public static String getGithubCommitLink() { public static String getGithubCommitLink() {
return "https://github.com/ProxioDev/RedisBungee/commit/" + GIT_COMMIT; return "https://github.com/ProxioDev/RedisBungee/commit/" + GIT_COMMIT;

View File

@ -42,12 +42,12 @@ public class CommandRedisBungee extends AdventureBaseCommand {
@Default @Default
@Subcommand("info|version|git") @Subcommand("info|version|git")
@Description("information about current redisbungee build")
public void info(CommandIssuer issuer) { public void info(CommandIssuer issuer) {
final String message = """ final String message = """
<color:aqua>This proxy is running RedisBungee Limework's fork <color:aqua>This proxy is running RedisBungee Limework's fork
<color:gold>======================================== <color:gold>========================================
<color:aqua>RedisBungee version: <color:green><version> <color:aqua>RedisBungee version: <color:green><version>
<color:aqua>Build date: <color:green><build-date>
<color:aqua>Commit: <color:green><commit> <color:aqua>Commit: <color:green><commit>
<color:gold>======================================== <color:gold>========================================
<color:gold>run /rb help for more commands"""; <color:gold>run /rb help for more commands""";
@ -57,7 +57,6 @@ public class CommandRedisBungee extends AdventureBaseCommand {
.deserialize( .deserialize(
message, message,
Placeholder.component("version", Component.text(Constants.VERSION)), Placeholder.component("version", Component.text(Constants.VERSION)),
Placeholder.component("build-date", Component.text( new Date(Constants.BUILD_DATE * 1000).toString() )),
Placeholder.component( Placeholder.component(
"commit", "commit",
Component.text(Constants.GIT_COMMIT.substring(0, 8)) Component.text(Constants.GIT_COMMIT.substring(0, 8))
@ -123,14 +122,6 @@ public class CommandRedisBungee extends AdventureBaseCommand {
} else currentPage = 1; } else currentPage = 1;
var data = new ArrayList<>(plugin.proxyDataManager().eachProxyCount().entrySet()); var data = new ArrayList<>(plugin.proxyDataManager().eachProxyCount().entrySet());
data.addAll(data);
data.addAll(data);
data.addAll(data);
data.addAll(data);
data.addAll(data);
data.addAll(data);
data.addAll(data);
data.addAll(data);
// there is no way this runs because there is always an heartbeat. // there is no way this runs because there is always an heartbeat.
// if not could be some shenanigans done by devs :P // if not could be some shenanigans done by devs :P
@ -169,17 +160,19 @@ public class CommandRedisBungee extends AdventureBaseCommand {
} }
if (currentPage > 1) { if (currentPage > 1) {
builder.append(MiniMessage.miniMessage().deserialize(previousPage) builder.append(MiniMessage.miniMessage().deserialize(previousPage)
.clickEvent(ClickEvent.runCommand("/rb show " + (currentPage - 1)))); .color(NamedTextColor.WHITE).clickEvent(ClickEvent.runCommand("/rb show " + (currentPage - 1))));
} else {
builder.append(MiniMessage.miniMessage().deserialize(previousPage).color(NamedTextColor.GRAY));
} }
if (subList.size() == pageSize && !subListProxies(data, currentPage + 1, pageSize).isEmpty()) { if (subList.size() == pageSize && !subListProxies(data, currentPage + 1, pageSize).isEmpty()) {
builder.append(MiniMessage.miniMessage().deserialize(nextPage) builder.append(MiniMessage.miniMessage().deserialize(nextPage)
.clickEvent(ClickEvent.runCommand("/rb show " + (currentPage + 1)))); .color(NamedTextColor.WHITE).clickEvent(ClickEvent.runCommand("/rb show " + (currentPage + 1))));
} else {
builder.append(MiniMessage.miniMessage().deserialize(nextPage).color(NamedTextColor.GRAY));
} }
builder.appendNewline(); builder.appendNewline();
builder.append(MiniMessage.miniMessage().deserialize(closer)); builder.append(MiniMessage.miniMessage().deserialize(closer));
sendMessage(issuer, builder.build()); sendMessage(issuer, builder.build());
} }
} }