9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-28 11:19:08 +00:00

Update sakura branding

This commit is contained in:
Samsuik
2025-06-23 21:30:04 +01:00
parent f73970eabd
commit 85159be01d
4 changed files with 68 additions and 51 deletions

View File

@@ -0,0 +1,30 @@
package me.samsuik.sakura.configuration;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
public final class SakuraBrandInformation {
private static final String VERSION_MESSAGE = """
<dark_purple>.
<dark_purple>| <white>This server is running <gradient:red:light_purple>Sakura</gradient>
<dark_purple>| <white>Commit<dark_gray>: \\<<commit>> <gray>targeting </gray>(<yellow>MC</yellow>: <gray><version></gray>)
<dark_purple>| <white>Github<dark_gray>: \\<<yellow><click:open_url:'https://github.com/Samsuik/Sakura'>link</click></yellow>>
<dark_purple>'""";
public static void sendBrandToPlayer(final CommandSender sender) {
sender.sendMessage(MiniMessage.miniMessage().deserialize(VERSION_MESSAGE,
Placeholder.component("commit", gitCommit()),
Placeholder.unparsed("version", Bukkit.getMinecraftVersion())
));
}
private static Component gitCommit() {
return Component.text("hover", NamedTextColor.YELLOW)
.hoverEvent(HoverEvent.showText(Component.text(Bukkit.getGitInformation())));
}
}