From 8ae038f3b76ce055ad845aa99d5b86fee86276fe Mon Sep 17 00:00:00 2001 From: LlmDl Date: Tue, 16 Aug 2016 16:02:13 -0500 Subject: [PATCH] v0.47: - Add ability to use Bold (&l), Italics (&o), Underline (&n), Magic (&k), Strike (&m) and Reset (&r) in the channel_format lines/tag_formats/directly in the chat line. --- src/ChatConfig.yml | 5 +++++ src/changelog.txt | 4 +++- src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java | 2 +- src/plugin.yml | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ChatConfig.yml b/src/ChatConfig.yml index 756009d..9129fd4 100644 --- a/src/ChatConfig.yml +++ b/src/ChatConfig.yml @@ -41,6 +41,11 @@ # Purple = &5, Gold = &6, LightGray = &7, Gray = &8 # DarkPurple = &9, LightGreen = &a, LightBlue = &b # Rose = &c, LightPurple = &d, Yellow = &e, White = &f + + # Text altering + # ------------- + # Bold = &l, Italics = &o, Underlined = &n, + # Magic = &k, Strike = &m, Reset = &r # Spam_time set the minimum time between messages to be flagged as spam spam_time: [spam_time] diff --git a/src/changelog.txt b/src/changelog.txt index ad54ddd..1038fc3 100644 --- a/src/changelog.txt +++ b/src/changelog.txt @@ -191,4 +191,6 @@ v0.44: v0.45: - Add chatconfig.yml option for modifying the 'no one can hear you' message. v0.46: - - Add ability to use colour codes (&) in chat line. Requires townychat.chat.color which is not given by default. \ No newline at end of file + - Add ability to use colour codes (&) in chat line. Requires townychat.chat.color which is not given by default. +v0.47: + - Add ability to use Bold (&l), Italics (&o), Underline (&n), Magic (&k), Strike (&m) and Reset (&r) in the channel_format lines/tag_formats/directly in the chat line. diff --git a/src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java b/src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java index a2e489e..837d297 100644 --- a/src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java +++ b/src/com/palmergames/bukkit/TownyChat/TownyChatFormatter.java @@ -175,7 +175,7 @@ public class TownyChatFormatter { }); // Replace colours last ({msg} is replaced last as it can't be regex parsed). - replacer.registerFormatReplacement("&{1}[0-9A-Fa-f]{1}", new TownyChatReplacerCallable() { + replacer.registerFormatReplacement("&{1}[0-9A-Fa-fLlOoNnKkMmRr]{1}", new TownyChatReplacerCallable() { @Override public String call(String match, LocalTownyChatEvent event) throws Exception { return "\u00A7" + match.charAt(1); diff --git a/src/plugin.yml b/src/plugin.yml index a75e777..c209d5e 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: TownyChat main: com.palmergames.bukkit.TownyChat.Chat -version: 0.46 +version: 0.47 author: ElgarL, Shade, phrstbrn website: http://code.google.com/a/eclipselabs.org/p/towny/ description: >