mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +00:00
v0.79:
- Fix colouring the alone message.
- Replace TownyMessaging method used to send some TownyChat messages.
- Removes double prefixes ie: [Towny] [TownyChat] message....
This commit is contained in:
1 parent
b6f81d938c
commit
6a95810e7c
7 files changed
+18
-19
No files matched your search
@@ -7,7 +7,7 @@
|
|||||||
<groupId>com.palmergames.bukkit</groupId>
|
<groupId>com.palmergames.bukkit</groupId>
|
||||||
<artifactId>TownyChat</artifactId>
|
<artifactId>TownyChat</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.78</version>
|
<version>0.79</version>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|||||||
@@ -334,3 +334,7 @@ v0.78:
|
|||||||
- Allow for colouring the alone message.
|
- Allow for colouring the alone message.
|
||||||
- Adapt to change in Towny 0.96.2.17 Version code.
|
- Adapt to change in Towny 0.96.2.17 Version code.
|
||||||
- Build against 0.96.2.17, minimum required Towny version now 0.96.2.17.
|
- Build against 0.96.2.17, minimum required Towny version now 0.96.2.17.
|
||||||
|
v0.79:
|
||||||
|
- Fix colouring the alone message.
|
||||||
|
- Replace TownyMessaging method used to send some TownyChat messages.
|
||||||
|
- Removes double prefixes ie: [Towny] [TownyChat] message....
|
||||||
@@ -135,7 +135,7 @@ public class Chat extends JavaPlugin {
|
|||||||
towny = (Towny) test;
|
towny = (Towny) test;
|
||||||
|
|
||||||
test = pm.getPlugin("dynmap");
|
test = pm.getPlugin("dynmap");
|
||||||
if (test != null) {
|
if (test != null && pm.getPlugin("dynmap").isEnabled()) {
|
||||||
dynMap = (DynmapAPI) test;
|
dynMap = (DynmapAPI) test;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -252,11 +252,11 @@ public class ChannelCommand extends BaseCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!chan.mute(split[1])) {
|
if (!chan.mute(split[1])) {
|
||||||
TownyMessaging.sendMsg(player, Translation.of("tc_player_already_muted_in_channel", chan.getName()));
|
TownyMessaging.sendMessage(player, Translation.of("tc_player_already_muted_in_channel", chan.getName()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TownyMessaging.sendMsg(player, Translation.of("tc_player_is_now_muted_in_channel", split[1], chan.getName()));
|
TownyMessaging.sendMessage(player, Translation.of("tc_player_is_now_muted_in_channel", split[1], chan.getName()));
|
||||||
} else if (!mute) {
|
} else if (!mute) {
|
||||||
String unmutePerm = plugin.getChannelsHandler().getUnmutePermission();
|
String unmutePerm = plugin.getChannelsHandler().getUnmutePermission();
|
||||||
if ((unmutePerm == null) || (unmutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().has(player, unmutePerm)))) {
|
if ((unmutePerm == null) || (unmutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().has(player, unmutePerm)))) {
|
||||||
@@ -268,11 +268,11 @@ public class ChannelCommand extends BaseCommand implements CommandExecutor {
|
|||||||
|
|
||||||
|
|
||||||
if (!chan.unmute(split[1])) {
|
if (!chan.unmute(split[1])) {
|
||||||
TownyMessaging.sendMsg(player, Translation.of("tc_player_is_not_muted_in_channel", chan.getName()));
|
TownyMessaging.sendMessage(player, Translation.of("tc_player_is_not_muted_in_channel", chan.getName()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TownyMessaging.sendMsg(player, Translation.of("tc_player_is_now_unmuted_in_channel", split[1], chan.getName()));
|
TownyMessaging.sendMessage(player, Translation.of("tc_player_is_now_unmuted_in_channel", split[1], chan.getName()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class TownyChatCommand extends BaseCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
} else if (split[0].equalsIgnoreCase("reload")) {
|
} else if (split[0].equalsIgnoreCase("reload")) {
|
||||||
plugin.reload();
|
plugin.reload();
|
||||||
TownyMessaging.sendMsg(sender, Translation.of("tc_settings_reloaded"));
|
TownyMessaging.sendMessage(sender, Translation.of("tc_settings_reloaded"));
|
||||||
} else {
|
} else {
|
||||||
TownyMessaging.sendErrorMsg(sender, Translation.of("tc_err_unrecognized_command_format"));
|
TownyMessaging.sendErrorMsg(sender, Translation.of("tc_err_unrecognized_command_format"));
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -64,7 +64,7 @@ public class ChannelJoinAliasCommand extends BukkitCommand {
|
|||||||
modes[i] = newModes.get(i);
|
modes[i] = newModes.get(i);
|
||||||
|
|
||||||
plugin.getTowny().setPlayerMode(player, modes, false);
|
plugin.getTowny().setPlayerMode(player, modes, false);
|
||||||
TownyMessaging.sendMsg(player, String.format(Translation.of("tc_you_are_now_talking_in_channel"), channel.getName()));
|
TownyMessaging.sendMessage(player, String.format(Translation.of("tc_you_are_now_talking_in_channel"), channel.getName()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public class StandardChannel extends Channel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (notifyjoin) {
|
if (notifyjoin) {
|
||||||
TownyMessaging.sendMsg(player, "You join " + Colors.White + getName());
|
TownyMessaging.sendMessage(player, "You join " + Colors.White + getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -280,20 +280,15 @@ public class StandardChannel extends Channel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((recipients.size() <= 1) && (ChatSettings.isUsingAloneMessage())) {
|
if (recipients.size() <= 1 && ChatSettings.isUsingAloneMessage()) {
|
||||||
|
|
||||||
String aloneMsg;
|
String aloneMsg = ChatSettings.getUsingAloneMessageString();
|
||||||
|
if (Towny.is116Plus())
|
||||||
|
aloneMsg = HexFormatter.translateHexColors(aloneMsg);
|
||||||
|
|
||||||
if (Towny.is116Plus()) {
|
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', aloneMsg));
|
||||||
aloneMsg = HexFormatter.translateHexColors(ChatSettings.getUsingAloneMessageString());
|
|
||||||
} else {
|
|
||||||
aloneMsg = ChatColor.translateAlternateColorCodes('&', ChatSettings.getUsingAloneMessageString());
|
|
||||||
}
|
|
||||||
|
|
||||||
sender.sendMessage(aloneMsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return recipients;
|
return recipients;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user