From f98c522fa6570902bd121691b1329e11c521f5a8 Mon Sep 17 00:00:00 2001 From: powercas_gamer Date: Wed, 24 Apr 2024 22:12:59 +0200 Subject: [PATCH] Make copyright year a placeholder (#1305) * make copyright year a placeholder * review --- .../proxy/command/builtin/VelocityCommand.java | 4 +++- .../com/velocitypowered/proxy/l10n/messages.properties | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/command/builtin/VelocityCommand.java b/proxy/src/main/java/com/velocitypowered/proxy/command/builtin/VelocityCommand.java index bd240804c..26f99ecd2 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/command/builtin/VelocityCommand.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/command/builtin/VelocityCommand.java @@ -46,6 +46,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.text.SimpleDateFormat; +import java.time.LocalDate; import java.util.Collection; import java.util.Date; import java.util.List; @@ -165,7 +166,8 @@ public final class VelocityCommand { final Component copyright = Component .translatable("velocity.command.version-copyright", Component.text(version.getVendor()), - Component.text(version.getName())); + Component.text(version.getName()), + Component.text(LocalDate.now().getYear())); source.sendMessage(velocity); source.sendMessage(copyright); diff --git a/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages.properties b/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages.properties index f5b6ae9b4..07aa348f3 100644 --- a/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages.properties +++ b/proxy/src/main/resources/com/velocitypowered/proxy/l10n/messages.properties @@ -48,7 +48,7 @@ velocity.command.glist-player-plural={0} players are currently connected to the velocity.command.glist-view-all=To view all players on servers, use /glist all. velocity.command.reload-success=Velocity configuration successfully reloaded. velocity.command.reload-failure=Unable to reload your Velocity configuration. Check the console for more details. -velocity.command.version-copyright=Copyright 2018-2023 {0}. {1} is licensed under the terms of the GNU General Public License v3. +velocity.command.version-copyright=Copyright 2018-{2} {0}. {1} is licensed under the terms of the GNU General Public License v3. velocity.command.no-plugins=There are no plugins currently installed. velocity.command.plugins-list=Plugins: {0} velocity.command.plugin-tooltip-website=Website: {0}