mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +00:00
- Colour channel name in the You have joined channel messages,
according to the channel message colour.
- Closes https://github.com/TownyAdvanced/Towny/issues/4503
This commit is contained in:
1 parent
0e6544c52f
commit
4c29b4e27d
4 files changed
+6
-3
No files matched your search
@@ -415,3 +415,5 @@ v0.97:
|
|||||||
- Fix channel sounds being played at the sender's location, fix muting channel sounds.
|
- Fix channel sounds being played at the sender's location, fix muting channel sounds.
|
||||||
- Remove built-in HexFormatter.
|
- Remove built-in HexFormatter.
|
||||||
- Update java to 17 and adopt jabel.
|
- Update java to 17 and adopt jabel.
|
||||||
|
- Colour channel name in the You have joined channel messages, according to the channel message colour.
|
||||||
|
- Closes https://github.com/TownyAdvanced/Towny/issues/4503
|
||||||
@@ -385,7 +385,7 @@ public class ChannelCommand extends BaseCommand implements CommandExecutor {
|
|||||||
|
|
||||||
Bukkit.getPluginManager().callEvent(new PlayerJoinChatChannelEvent(player, chan));
|
Bukkit.getPluginManager().callEvent(new PlayerJoinChatChannelEvent(player, chan));
|
||||||
|
|
||||||
TownyMessaging.sendMessage(player, Translatable.of("tc_you_joined_channel", chan.getName()));
|
TownyMessaging.sendMessage(player, Translatable.of("tc_you_joined_channel", Colors.translateColorCodes(chan.getMessageColour()) + chan.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void parseChannelSoundToggle(Player player, String[] split) {
|
public static void parseChannelSoundToggle(Player player, String[] split) {
|
||||||
|
|||||||
+2
-1
@@ -6,6 +6,7 @@ import com.palmergames.bukkit.TownyChat.events.PlayerJoinChatChannelEvent;
|
|||||||
import com.palmergames.bukkit.towny.TownyMessaging;
|
import com.palmergames.bukkit.towny.TownyMessaging;
|
||||||
import com.palmergames.bukkit.towny.TownyUniverse;
|
import com.palmergames.bukkit.towny.TownyUniverse;
|
||||||
import com.palmergames.bukkit.towny.object.Translatable;
|
import com.palmergames.bukkit.towny.object.Translatable;
|
||||||
|
import com.palmergames.bukkit.util.Colors;
|
||||||
import com.palmergames.util.StringMgmt;
|
import com.palmergames.util.StringMgmt;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@@ -52,7 +53,7 @@ public class ChannelJoinAliasCommand extends BukkitCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugin.setPlayerChannel(player, channel);
|
plugin.setPlayerChannel(player, channel);
|
||||||
TownyMessaging.sendMessage(player, Translatable.of("tc_you_are_now_talking_in_channel", channel.getName()));
|
TownyMessaging.sendMessage(player, Translatable.of("tc_you_are_now_talking_in_channel", Colors.translateColorCodes(channel.getMessageColour()) + channel.getName()));
|
||||||
Bukkit.getPluginManager().callEvent(new PlayerJoinChatChannelEvent(player, channel));
|
Bukkit.getPluginManager().callEvent(new PlayerJoinChatChannelEvent(player, channel));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class StandardChannel extends Channel {
|
|||||||
tryPlayChannelSound(event.getRecipients());
|
tryPlayChannelSound(event.getRecipients());
|
||||||
|
|
||||||
if (notifyjoin)
|
if (notifyjoin)
|
||||||
TownyMessaging.sendMessage(player, "You join " + Colors.White + getName());
|
TownyMessaging.sendMessage(player, "You join " + Colors.translateColorCodes(getMessageColour()) + getName());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform any last channel specific functions like logging this chat and
|
* Perform any last channel specific functions like logging this chat and
|
||||||
|
|||||||
Reference in new issue
Block a user