diff --git a/core/src/main/kotlin/com/github/spigotbasics/core/messages/Message.kt b/core/src/main/kotlin/com/github/spigotbasics/core/messages/Message.kt index ea2e9a1a..340afae4 100644 --- a/core/src/main/kotlin/com/github/spigotbasics/core/messages/Message.kt +++ b/core/src/main/kotlin/com/github/spigotbasics/core/messages/Message.kt @@ -3,12 +3,12 @@ package com.github.spigotbasics.core.messages import com.github.spigotbasics.core.messages.tags.MessageTagProvider import com.github.spigotbasics.core.messages.tags.TagResolverFactory import com.github.spigotbasics.pipe.SerializedMiniMessage -import net.kyori.adventure.platform.bukkit.BukkitComponentSerializer import net.kyori.adventure.text.Component import net.kyori.adventure.text.JoinConfiguration import net.kyori.adventure.text.minimessage.MiniMessage import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer +import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer import org.bukkit.command.CommandSender import org.bukkit.entity.Player @@ -175,7 +175,11 @@ data class Message( private val miniMessage = MiniMessage.miniMessage() private val legacyComponentSerializer = - BukkitComponentSerializer.legacy() + LegacyComponentSerializer + .builder() + .hexColors() + .useUnusualXRepeatedCharacterHexFormat() // They are not unusual (+1) + .build() private val bungeeComponentSerializer = BungeeComponentSerializer.get() } diff --git a/core/src/main/resources/custom-tags.yml b/core/src/main/resources/custom-tags.yml index 76026290..2fc8e12b 100644 --- a/core/src/main/resources/custom-tags.yml +++ b/core/src/main/resources/custom-tags.yml @@ -37,20 +37,35 @@ # This example lets you use to insert a clickable version of a player's name player-dm: type: parsed - value: " >>" + value: " >'>" -# Player name with gold color -player-name-gold: +player-name-colored: type: parsed - value: "" + value: "" error: type: parsed - value: "Error: " + value: "Error: " bright_green: type: color value: "#CCFFCC" + +lite_text: + type: color + value: "#DCE7EA" +negative_text: + type: color + value: "#3A97B7" +dark_text: + type: color + value: "#23739C" +def_text: + type: color + value: "#68CDE1" +error_red: + type: color + value: "#FF2222" bright_red: type: color - value: "#FF8888" \ No newline at end of file + value: "#FF8888" diff --git a/modules/basics-announcements/src/main/resources/config.yml b/modules/basics-announcements/src/main/resources/config.yml index e520187f..87d7ed19 100644 --- a/modules/basics-announcements/src/main/resources/config.yml +++ b/modules/basics-announcements/src/main/resources/config.yml @@ -2,9 +2,9 @@ interval: 2 minutes pick-random: true show-in-console: true messages: - - "\"OMG YOU'RE USING BASICS???!!!\" Basics makes players wet since 2024!" - - "Check out the Basics repo on GitHub!" - - "\"With Basics, server management has never been this simple. Say goodbye to headaches and hello to a smooth gaming experience!\"\n- CMarco (AI)" - - "\"Basics is the best plugin ever!\"\n- mfnalex" - - "(You can customize these messages in the basics-announcements module)" - - "If you got PlaceholderAPI installed, you can use any placeholder: " \ No newline at end of file + - "Welcome, to the Basics plugin! We have worked hard we hope you enjoy the plugin!" + - "Did you know? You can check out the basics repo on Click to visit GitHub'>GitHub" + - "\"With Basics, server management has never been this simple. Say goodbye to headaches and hello to a smooth gaming experience!\"\n- CMarco (AI)" + - "You can customize these messages in the basics-announcements module" + - "If you have PlaceholderAPI installed, you can use any placeholder! " + - "Basics utilizes Click to see the MiniMessage Documentation'>MiniMessage!" diff --git a/modules/basics-chat-format/src/main/resources/config.yml b/modules/basics-chat-format/src/main/resources/config.yml index 197d1de7..18da681c 100644 --- a/modules/basics-chat-format/src/main/resources/config.yml +++ b/modules/basics-chat-format/src/main/resources/config.yml @@ -1,2 +1,2 @@ # Tags: <#message> -chat-format: " » <#message>" \ No newline at end of file +chat-format: " » <#message>" diff --git a/modules/basics-enchant/src/main/resources/messages.yml b/modules/basics-enchant/src/main/resources/messages.yml index 67943ca3..35b01598 100644 --- a/modules/basics-enchant/src/main/resources/messages.yml +++ b/modules/basics-enchant/src/main/resources/messages.yml @@ -1,3 +1,4 @@ -enchanted-self: "Enchanted your <#item> with <#enchantment> <#roman-level>!" -enchanted-others: "Enchanted <#item> with <#enchantment> <#roman-level>!" -removed-self: "Removed <#enchantment> from your <#item>!" \ No newline at end of file +# Tags: <#item> +enchanted-self: "Enchanted your <#item> with <#enchantment> <#roman-level>!" +enchanted-others: "Enchanted <#item> with <#enchantment> <#roman-level>!" +removed-self: "Removed <#enchantment> from your <#item>!" diff --git a/modules/basics-gamemode/src/main/resources/messages.yml b/modules/basics-gamemode/src/main/resources/messages.yml index 02d8e6be..c2da9801 100644 --- a/modules/basics-gamemode/src/main/resources/messages.yml +++ b/modules/basics-gamemode/src/main/resources/messages.yml @@ -1,8 +1,8 @@ # Tags: <#new-gamemode> -gamemode-changed-others: "Set game mode to <#new-gamemode>." -gamemode-changed-self: "Set your game mode to <#new-gamemode>." +gamemode-changed-others: "Set game mode to <#new-gamemode>." +gamemode-changed-self: "Set your game mode to <#new-gamemode>." survival: "survival" creative: "creative" adventure: "adventure" -spectator: "spectator" \ No newline at end of file +spectator: "spectator" diff --git a/modules/basics-homes/src/main/resources/messages.yml b/modules/basics-homes/src/main/resources/messages.yml index a5e9cf77..733fa9cb 100644 --- a/modules/basics-homes/src/main/resources/messages.yml +++ b/modules/basics-homes/src/main/resources/messages.yml @@ -1,26 +1,26 @@ # TODO: Add some system to auto-apply all home-related placeholders, not just name # Tags: <#home> // later / TODO: <#limit> <#regex> <#name> <#homes> <#x> <#y> <#z> <#world> -home-set: "Set home <#home> to your current location." -home-deleted: "Deleted home <#home>." -home-teleported: "Teleported to home <#home>." -home-not-found: "Home <#home> not found." +home-set: "Set home <#home> to your current location." +home-deleted: "Deleted home <#home>." +home-teleported: "Teleported to home <#home>." +home-not-found: "Home <#home> not found." -home-none-set: "You don't have any homes set." +home-none-set: "You don't have any homes set." # Tags: <#limit> -home-limit-reached: "You cannot set more than <#limit> homes." +home-limit-reached: "You cannot set more than <#limit> homes." # Tags: <#world> // TODO: Move to core messages -home-world-not-loaded: "World <#world> is not loaded." +home-world-not-loaded: "World <#world> is not loaded." # Tags: <#regex> -home-invalid-name: "Invalid home name. Home names must match the following regex: <#regex>" +home-invalid-name: "Invalid home name. Home names must match the following regex: <#regex>" # Tags: <#homes> (= home-list-entry + home-list-separator) home-list: -- "Available homes (Click to teleport):" -- "<#homes>" + - "Available homes (Click to teleport):" + - " <#homes>" # Tags: <#name> <#x> <#y> <#z> <#world> -home-list-entry: "<#home>\nX: <#x> | Y: <#y> | Z: <#z> | <#world>\nClick to teleport'>'><#home>" -home-list-separator: ", " \ No newline at end of file +home-list-entry: "<#home>\nX: <#x> | Y: <#y> | Z: <#z> | <#world>\nClick to teleport'>'><#home>" +home-list-separator: ", " diff --git a/modules/basics-join-leave-messages/src/main/resources/config.yml b/modules/basics-join-leave-messages/src/main/resources/config.yml index 07962d26..f04277c2 100644 --- a/modules/basics-join-leave-messages/src/main/resources/config.yml +++ b/modules/basics-join-leave-messages/src/main/resources/config.yml @@ -13,5 +13,5 @@ ## Quit message shown to console #quit-console: "%player_name% left the game" -join: "+ joined the game" -quit: "- left the game" \ No newline at end of file +join: "+ joined the game" +quit: "- left the game" diff --git a/modules/basics-msg/src/main/resources/config.yml b/modules/basics-msg/src/main/resources/config.yml index aeb37bfc..1268faab 100644 --- a/modules/basics-msg/src/main/resources/config.yml +++ b/modules/basics-msg/src/main/resources/config.yml @@ -1,5 +1,5 @@ # Tags: <#message> -format-received: "[ » you ] <#cdcdcd><#message>" -format-sent: "[ you » ] <#cdcdcd><#message>" -format-self: "[ you » yourself ] <#cdcdcd><#message>" -format-console: "[ Console » you ] <#cdcdcd><#message>" \ No newline at end of file +format-received: "[ » You ] <#message>" +format-sent: "[ You » ] <#message>" +format-self: "[ You » Yourself ] <#message>" +format-console: "[ Console » you ] <#message>" diff --git a/modules/basics-repair/src/main/resources/messages.yml b/modules/basics-repair/src/main/resources/messages.yml index 3b066449..3436eedc 100644 --- a/modules/basics-repair/src/main/resources/messages.yml +++ b/modules/basics-repair/src/main/resources/messages.yml @@ -1,11 +1,11 @@ # Repair message sent to you when repairing another player's hand -repair-hand-other: "Repaired hand" +repair-hand-other: "Repaired hand" # Repair message sent when you repair your own hand -repair-hand-self: "Repaired your hand" +repair-hand-self: "Repaired your hand" # Repair message sent when you repair another player's inventory -repair-all-other: "Repaired inventory" +repair-all-other: "Repaired inventory" # Repair message sent when you repair your own inventory -repair-all-self: "Repaired your inventory" +repair-all-self: "Repaired your inventory" diff --git a/modules/basics-world/src/main/resources/messages.yml b/modules/basics-world/src/main/resources/messages.yml index 1bd09d23..34d4ff23 100644 --- a/modules/basics-world/src/main/resources/messages.yml +++ b/modules/basics-world/src/main/resources/messages.yml @@ -1,5 +1,5 @@ # Tags: <#world> -world-teleported: "Teleported to world <#world>!" -already-in-world: "You are already in world <#world>!" -starting-teleport: "Teleporting to world <#world> ..." -teleport-unsuccessful: "Teleportation to world <#world> was unsuccessful!" \ No newline at end of file +world-teleported: "Teleported to world <#world>!" +already-in-world: "You are already in world <#world>!" +starting-teleport: "Teleporting to world <#world> ..." +teleport-unsuccessful: "Teleportation to world <#world> was unsuccessful!"