mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-02 22:23:18 +00:00
v0.6:
- 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:
1 parent
1eec33b5c8
commit
98cc34034b
3 files changed
+16
-4
No files matched your search
+3
-1
@@ -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
@@ -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: >
|
||||
|
||||
Reference in new issue
Block a user