mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-02 14:38:57 +00:00
- Fix default channels not being returned if TownyChat is searching
for a channel of that type.
- Closes https://github.com/TownyAdvanced/Towny/issues/4984
This commit is contained in:
1 parent
226ae6ee30
commit
9710f43544
2 files changed
+7
-1
No files matched your search
@@ -379,4 +379,6 @@ v0.89:
|
||||
- Update min. Towny to 0.97.0.0 and remove NotRegisteredException catches.
|
||||
- Add support for EssentialsDiscord, courtesy of JRoy with PR #33.
|
||||
v0.90:
|
||||
- Allow channeltags to make use of hex colour formatting.
|
||||
- Allow channeltags to make use of hex colour formatting.
|
||||
- Fix default channels not being returned if TownyChat is searching for a channel of that type.
|
||||
- Closes https://github.com/TownyAdvanced/Towny/issues/4984
|
||||
@@ -105,6 +105,10 @@ public class ChannelsHolder {
|
||||
|
||||
String name = player.getName();
|
||||
|
||||
// Return the defaultChan if it is the correct type, and the player is present in that channel.
|
||||
if (getDefaultChannel() != null && getDefaultChannel().isPresent(name) && getDefaultChannel().getType().equals(type))
|
||||
return getDefaultChannel();
|
||||
|
||||
for (Channel channel: channels.values()) {
|
||||
if (!channel.isPresent(name)) continue;
|
||||
if (!channel.getType().equals(type)) continue;
|
||||
|
||||
Reference in new issue
Block a user