mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +00:00
- Fixed: GLOBAL channelTypes (default: general and local channels) are
no longer formatted by TownyChat if modify_chat.enabled is false.
- DEFAULT, TOWN, NATION & ALLIANCE types are still formatted by
Towny when modify_chat.enable is false.
- Closes: https://github.com/TownyAdvanced/Towny/issues/3568
This commit is contained in:
1 parent
068b186df0
commit
545ae8b19d
3 files changed
+11
-3
No files matched your search
@@ -288,3 +288,6 @@ v0.65:
|
|||||||
or if non was found, the next global channel.
|
or if non was found, the next global channel.
|
||||||
- Ex: While being in townchat you use "/tc" you could find yourself in globalchat.
|
- Ex: While being in townchat you use "/tc" you could find yourself in globalchat.
|
||||||
- Now you will be told you're already in the channel you just used the command to enter into.
|
- Now you will be told you're already in the channel you just used the command to enter into.
|
||||||
|
- Fixed: GLOBAL channelTypes (default: general and local channels) are no longer formatted by TownyChat if modify_chat.enabled is false.
|
||||||
|
- DEFAULT, TOWN, NATION & ALLIANCE types are still formatted by Towny when modify_chat.enable is false.
|
||||||
|
- Closes: https://github.com/TownyAdvanced/Towny/issues/3568
|
||||||
@@ -124,10 +124,15 @@ public class StandardChannel extends Channel {
|
|||||||
Format = PlaceholderAPI.setPlaceholders(player, Format);
|
Format = PlaceholderAPI.setPlaceholders(player, Format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Only modify GLOBAL channelType chat (general and local chat channels) if isModifyChat() is true.
|
||||||
|
*/
|
||||||
|
if (!(exec.equals(channelTypes.GLOBAL) && !ChatSettings.isModify_chat())) {
|
||||||
event.setFormat(Format.replace("{channelTag}", getChannelTag()).replace("{msgcolour}", getMessageColour()));
|
event.setFormat(Format.replace("{channelTag}", getChannelTag()).replace("{msgcolour}", getMessageColour()));
|
||||||
|
|
||||||
LocalTownyChatEvent chatEvent = new LocalTownyChatEvent(event, resident);
|
LocalTownyChatEvent chatEvent = new LocalTownyChatEvent(event, resident);
|
||||||
event.setFormat(TownyChatFormatter.getChatFormat(chatEvent));
|
event.setFormat(TownyChatFormatter.getChatFormat(chatEvent));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set all the listeners for Bukkit to send this message to.
|
* Set all the listeners for Bukkit to send this message to.
|
||||||
|
|||||||
@@ -137,9 +137,9 @@ public enum ChatConfigNodes {
|
|||||||
MODIFY_CHAT_ENABLE(
|
MODIFY_CHAT_ENABLE(
|
||||||
"modify_chat.enable",
|
"modify_chat.enable",
|
||||||
"true",
|
"true",
|
||||||
"# This is used for when you don't have another plugin to format chat.",
|
"# When true Towny will format all ChannelTypes,",
|
||||||
"# or you want some other plugin to handle open chat, but want Towny formatting.",
|
"# When false Towny will only format TOWN, NATION, ALLIANCE, DEFAULT types.",
|
||||||
"# It will cause Towny to overwrite any other plugins alterations to the format."),
|
"# When false Towny will not format GLOBAL types, leaving other chat plugins to do the work."),
|
||||||
MODIFY_CHAT_PER_WORLD(
|
MODIFY_CHAT_PER_WORLD(
|
||||||
"modify_chat.per_world",
|
"modify_chat.per_world",
|
||||||
"false",
|
"false",
|
||||||
|
|||||||
Reference in new issue
Block a user