- Fixed channel tag for the global channel.
	- Fixed range test trying to cross worlds.
This commit is contained in:
ElgarL committed 2012-01-14 00:10:49 +00:00
1 parent aaf14506a5
commit aa8ddfb584
2 files changed
+9 -3

No files matched your search

+3
View File
@@ -63,4 +63,7 @@ v0.10:
This requires you have the permission node 'towny.chat.spy' and be using TownyChat.
If you toggle this mode on you will be able to see all town/nation/global, and all custom channel chat.
- If a player doesn't have the 'towny.chat.global' permission node, any open chat will pass through for any other plugins to handle.
v0.11:
- Fixed channel tag for the global channel.
- Fixed range test trying to cross worlds.
@@ -261,7 +261,7 @@ public class TownyPlayerHighestListener extends PlayerListener {
Boolean bEssentials = towny.isEssentials();
if (TownySettings.isUsingModifyChat()) {
event.setFormat(TownyUniverse.getDataSource().getWorld(player.getWorld().getName()).getChatGlobalChannelFormat());
event.setFormat(TownyUniverse.getDataSource().getWorld(player.getWorld().getName()).getChatGlobalChannelFormat().replace("{channelTag}", TownySettings.getChatChannelName(command)).replace("{msgcolour}", TownySettings.getChatChannelColour(command)));
}
TownyChatEvent chatEvent = new TownyChatEvent(event, resident);
@@ -378,7 +378,10 @@ public class TownyPlayerHighestListener extends PlayerListener {
if (range == 0)
return player1.getWorld().equals(player2.getWorld());
// Range check
return (player1.getLocation().distance(player2.getLocation()) < range);
// Range check (same world)
if (player1.getWorld().equals(player2.getWorld()))
return (player1.getLocation().distance(player2.getLocation()) < range);
else
return false;
}
}