- Changed global chat to pass through bukkits chat process instead of our own (allows other plugins to see it again).
This commit is contained in:
ElgarL committed 2011-12-17 22:12:08 +00:00
1 parent 1eec33b5c8
commit 98cc34034b
3 files changed
+16 -4

No files matched your search

+3 -1
View File
@@ -17,4 +17,6 @@ v0.5:
to clear all chat modes '/g'.
- Added a new permission node for global chat ('/g') of 'towny.chat.global'.
- Added {worldname} as an accepted entry.
- Fixed '/g' mode to add formatting.
- Fixed '/g' mode to add formatting.
v0.6:
- Changed global chat to pass through bukkits chat process instead of our own (allows other plugins to see it again).
@@ -115,7 +115,16 @@ public class TownyPlayerHighestListener extends PlayerListener {
parseNationChatCommand(event, "/nc", player);
} else if (plugin.hasPlayerMode(player, "g")) {
// Global chat
parseGlobalChannelChatCommand(event, "/g", player);
//parseGlobalChannelChatCommand(event, "/g", player);
// This is Global chat.
if (TownySettings.isUsingModifyChat()) {
event.setFormat(TownySettings.getModifyChatFormat());
}
TownyChatEvent chatEvent = new TownyChatEvent(event, resident);
event.setFormat(TownyChatFormatter.getChatFormat(chatEvent));
return;
} else {
for (String channel : TownySettings.getChatChannels()) {
@@ -127,7 +136,7 @@ public class TownyPlayerHighestListener extends PlayerListener {
}
}
// All chat modes are disabled, or this is open chat.
// All chat modes are disabled, or this is Global chat.
if (TownySettings.isUsingModifyChat()) {
event.setFormat(TownySettings.getModifyChatFormat());
}
@@ -165,6 +174,7 @@ public class TownyPlayerHighestListener extends PlayerListener {
TownyChatEvent chatEvent = new TownyChatEvent(event, resident);
event.setFormat(TownyChatFormatter.getChatFormat(chatEvent));
TownyMessaging.sendNationMessage(nation, chatEvent.getFormat().replace("%1$s", event.getPlayer().getDisplayName()).replace("%2$s", event.getMessage()));
} catch (NotRegisteredException x) {
TownyMessaging.sendErrorMsg(player, x.getError());
+1 -1
View File
@@ -1,6 +1,6 @@
name: TownyChat
main: com.palmergames.bukkit.TownyChat.Chat
version: 0.5
version: 0.6
author: ElgarL
website: http://code.google.com/a/eclipselabs.org/p/towny/
description: >