mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-02 06:28:58 +00:00
v0.48:
- Add new chatconfig tags {permuserprefix}, {permusersuffix}, used
to show only user prefix and suffixes. Requires Towny 0.91.4.8 or newer
to function properly!
This commit is contained in:
1 parent
8ae038f3b7
commit
87b21125be
6 files changed
+23
-5
No files matched your search
+4
-2
@@ -25,8 +25,10 @@
|
||||
|
||||
# {townycolor} - Towny name colour for king/mayor/resident
|
||||
# {group} - Players group name pulled from your permissions plugin
|
||||
# {permprefix} - Permission group prefix
|
||||
# {permsuffix} - Permission group suffix.
|
||||
# {permuserprefix} - Permission user prefix.
|
||||
# {permusersuffix} - Permission user suffix.
|
||||
# {permprefix} - Permission group and user prefix.
|
||||
# {permsuffix} - Permission group and user suffix.
|
||||
|
||||
# {playername} - Default player name.
|
||||
# {modplayername} - Modified player name (use if Towny is over writing some other plugins changes).
|
||||
|
||||
@@ -194,3 +194,5 @@ v0.46:
|
||||
- Add ability to use colour codes (&) in chat line. Requires townychat.chat.color which is not given by default.
|
||||
v0.47:
|
||||
- Add ability to use Bold (&l), Italics (&o), Underline (&n), Magic (&k), Strike (&m) and Reset (&r) in the channel_format lines/tag_formats/directly in the chat line.
|
||||
v0.48:
|
||||
- Add new chatconfig tags {permuserprefix}, {permusersuffix}, used to show only user prefix and suffixes. Requires Towny 0.91.4.8 or newer to function properly!
|
||||
@@ -25,7 +25,7 @@ public class LeaveCommand implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
// If not our command
|
||||
if ((!label.equalsIgnoreCase("leave") || args.length != 1) &&
|
||||
(!label.equalsIgnoreCase("ch") || args.length != 2 || !args[0].equalsIgnoreCase("leave"))) {
|
||||
(!label.equalsIgnoreCase("channel") || args.length != 2 || !args[0].equalsIgnoreCase("leave"))) {
|
||||
TownyMessaging.sendErrorMsg(sender, "[TownyChat] Error: Invalid command!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -153,6 +153,20 @@ public class TownyChatFormatter {
|
||||
}
|
||||
});
|
||||
|
||||
replacer.registerFormatReplacement(Pattern.quote("{permuserprefix}"), new TownyChatReplacerCallable() {
|
||||
@Override
|
||||
public String call(String match, LocalTownyChatEvent event) throws Exception {
|
||||
return TownyUniverse.getPermissionSource().getPrefixSuffix(event.getResident(), "userprefix");
|
||||
}
|
||||
});
|
||||
replacer.registerFormatReplacement(Pattern.quote("{permusersuffix}"), new TownyChatReplacerCallable() {
|
||||
@Override
|
||||
public String call(String match, LocalTownyChatEvent event) throws Exception {
|
||||
return TownyUniverse.getPermissionSource().getPrefixSuffix(event.getResident(), "usersuffix");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
replacer.registerFormatReplacement(Pattern.quote("{playername}"), new TownyChatReplacerCallable() {
|
||||
@Override
|
||||
public String call(String match, LocalTownyChatEvent event) throws Exception {
|
||||
|
||||
@@ -218,7 +218,7 @@ public abstract class Channel {
|
||||
* Set name of permissions node to leave a the channel
|
||||
*/
|
||||
public void setLeavePermission(String permission) {
|
||||
leavePermission = permission;;
|
||||
leavePermission = permission;
|
||||
}
|
||||
|
||||
public boolean hasMuteList() {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
name: TownyChat
|
||||
main: com.palmergames.bukkit.TownyChat.Chat
|
||||
version: 0.47
|
||||
version: 0.48
|
||||
author: ElgarL, Shade, phrstbrn
|
||||
website: http://code.google.com/a/eclipselabs.org/p/towny/
|
||||
description: >
|
||||
|
||||
Reference in new issue
Block a user