mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 06:28:57 +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
+15
-3
No files matched your search
@@ -18,3 +18,5 @@ v0.5:
|
|||||||
- Added a new permission node for global chat ('/g') of 'towny.chat.global'.
|
- Added a new permission node for global chat ('/g') of 'towny.chat.global'.
|
||||||
- Added {worldname} as an accepted entry.
|
- 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);
|
parseNationChatCommand(event, "/nc", player);
|
||||||
} else if (plugin.hasPlayerMode(player, "g")) {
|
} else if (plugin.hasPlayerMode(player, "g")) {
|
||||||
// Global chat
|
// 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 {
|
} else {
|
||||||
|
|
||||||
for (String channel : TownySettings.getChatChannels()) {
|
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()) {
|
if (TownySettings.isUsingModifyChat()) {
|
||||||
event.setFormat(TownySettings.getModifyChatFormat());
|
event.setFormat(TownySettings.getModifyChatFormat());
|
||||||
}
|
}
|
||||||
@@ -165,6 +174,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));
|
||||||
|
|
||||||
TownyMessaging.sendNationMessage(nation, chatEvent.getFormat().replace("%1$s", event.getPlayer().getDisplayName()).replace("%2$s", event.getMessage()));
|
TownyMessaging.sendNationMessage(nation, chatEvent.getFormat().replace("%1$s", event.getPlayer().getDisplayName()).replace("%2$s", event.getMessage()));
|
||||||
} catch (NotRegisteredException x) {
|
} catch (NotRegisteredException x) {
|
||||||
TownyMessaging.sendErrorMsg(player, x.getError());
|
TownyMessaging.sendErrorMsg(player, x.getError());
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name: TownyChat
|
name: TownyChat
|
||||||
main: com.palmergames.bukkit.TownyChat.Chat
|
main: com.palmergames.bukkit.TownyChat.Chat
|
||||||
version: 0.5
|
version: 0.6
|
||||||
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: >
|
||||||
|
|||||||
Reference in new issue
Block a user