mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 22:21:52 +00:00
v0.32:
- Don't check version of CraftIRC. Will work with all versions post 3.1. - Fix for not colouring resident titles.
This commit is contained in:
1 parent
b173b7507a
commit
582796e43a
4 files changed
+5
-9
No files matched your search
@@ -126,3 +126,6 @@ v0.30:
|
|||||||
v0.31:
|
v0.31:
|
||||||
- Update for the Bukkit move to AsyncPlayerChatEvent.
|
- Update for the Bukkit move to AsyncPlayerChatEvent.
|
||||||
- Fix in onPlayerCommandPreprocess for an empty message error.
|
- Fix in onPlayerCommandPreprocess for an empty message error.
|
||||||
|
v0.32:
|
||||||
|
- Don't check version of CraftIRC. Will work with all versions post 3.1.
|
||||||
|
- Fix for not colouring resident titles.
|
||||||
@@ -118,15 +118,8 @@ public class Chat extends JavaPlugin {
|
|||||||
*/
|
*/
|
||||||
test = pm.getPlugin("CraftIRC");
|
test = pm.getPlugin("CraftIRC");
|
||||||
if (test != null) {
|
if (test != null) {
|
||||||
try {
|
|
||||||
if (Double.valueOf(test.getDescription().getVersion()) >= 3.1) {
|
|
||||||
craftIRC = (CraftIRC) test;
|
craftIRC = (CraftIRC) test;
|
||||||
irc = new CraftIRCHandler(this, craftIRC, "towny");
|
irc = new CraftIRCHandler(this, craftIRC, "towny");
|
||||||
} else
|
|
||||||
getLogger().warning("TownyChat requires CraftIRC version 3.1 or higher to relay chat.");
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
getLogger().warning("Non number format found for craftIRC version string!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ public class TownyChatFormatter {
|
|||||||
replacer.registerFormatReplacement(Pattern.quote("{townycolor}"), new TownyChatReplacerCallable() {
|
replacer.registerFormatReplacement(Pattern.quote("{townycolor}"), new TownyChatReplacerCallable() {
|
||||||
@Override
|
@Override
|
||||||
public String call(String match, LocalTownyChatEvent event) throws Exception {
|
public String call(String match, LocalTownyChatEvent event) throws Exception {
|
||||||
return event.getResident().isMayor() ? (event.getResident().isKing() ? ChatSettings.getKingColour() : ChatSettings.getMayorColour()) : "";
|
return event.getResident().isMayor() ? (event.getResident().isKing() ? ChatSettings.getKingColour() : ChatSettings.getMayorColour()) : ChatSettings.getResidentColour();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
replacer.registerFormatReplacement(Pattern.quote("{group}"), new TownyChatReplacerCallable() {
|
replacer.registerFormatReplacement(Pattern.quote("{group}"), new TownyChatReplacerCallable() {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name: TownyChat
|
name: TownyChat
|
||||||
main: com.palmergames.bukkit.TownyChat.Chat
|
main: com.palmergames.bukkit.TownyChat.Chat
|
||||||
version: 0.31
|
version: 0.32
|
||||||
author: ElgarL, Shade, phrstbrn
|
author: ElgarL, Shade, phrstbrn
|
||||||
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