- Fixed custom channel chat not showing in the console.
This commit is contained in:
ElgarL committed 2011-10-31 09:07:17 +00:00
1 parent 3180d767ce
commit bb326c93dd
3 files changed
+5 -2

No files matched your search

+3 -1
View File
@@ -6,4 +6,6 @@ v0.2:
If players are using chat modes we need to run first to cancel the chat event for other plugins. If players are using chat modes we need to run first to cancel the chat event for other plugins.
v0.3: v0.3:
- TownyChat now only enables itself if Towny successfully starts. - TownyChat now only enables itself if Towny successfully starts.
- Fixed missing {} around modplayername. - Fixed missing {} around modplayername.
v0.4:
- Fixed custom channel chat not showing in the console.
@@ -146,6 +146,7 @@ public class TownyPlayerHighestListener extends PlayerListener {
TownyChatEvent chatEvent = new TownyChatEvent(event, resident); TownyChatEvent chatEvent = new TownyChatEvent(event, resident);
event.setFormat(TownyChatFormatter.getChatFormat(chatEvent)); event.setFormat(TownyChatFormatter.getChatFormat(chatEvent));
TownyUniverse.plugin.log(chatEvent.getFormat().replace("%1$s", event.getPlayer().getDisplayName()).replace("%2$s", event.getMessage()));
for (Player test : plugin.getTownyUniverse().getOnlinePlayers()) { for (Player test : plugin.getTownyUniverse().getOnlinePlayers()) {
if (!plugin.isPermissions() || (plugin.isPermissions() && TownyUniverse.getPermissionSource().hasPermission(test, TownySettings.getChatChannelPermission(command)))) if (!plugin.isPermissions() || (plugin.isPermissions() && TownyUniverse.getPermissionSource().hasPermission(test, TownySettings.getChatChannelPermission(command))))
TownyMessaging.sendMessage(test, chatEvent.getFormat().replace("%1$s", event.getPlayer().getDisplayName()).replace("%2$s", event.getMessage())); TownyMessaging.sendMessage(test, chatEvent.getFormat().replace("%1$s", event.getPlayer().getDisplayName()).replace("%2$s", event.getMessage()));
+1 -1
View File
@@ -1,6 +1,6 @@
name: TownyChat name: TownyChat
main: com.palmergames.bukkit.TownyChat.Chat main: com.palmergames.bukkit.TownyChat.Chat
version: 0.3 version: 0.4
author: ElgarL author: ElgarL
website: http://code.google.com/a/eclipselabs.org/p/towny/ website: http://code.google.com/a/eclipselabs.org/p/towny/
description: > description: >