Skip to content

Commit

Permalink
Chat was going to banned members
Browse files Browse the repository at this point in the history
Fixes #12
  • Loading branch information
tastybento committed Jan 13, 2020
1 parent 210f7b0 commit 527c300
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/world/bentobox/chat/listeners/ChatListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.managers.RanksManager;
import world.bentobox.chat.Chat;

/**
Expand Down Expand Up @@ -87,8 +88,8 @@ private void islandChat(Island i, Player player, String message) {
}

private void teamChat(final Player player, String message) {
// Get island members
addon.getIslands().getIsland(player.getWorld(), player.getUniqueId()).getMembers().keySet().stream()
// Get island members of coop or above
addon.getIslands().getIsland(player.getWorld(), player.getUniqueId()).getMemberSet(RanksManager.COOP_RANK).stream()
// Map to users
.map(User::getInstance)
// Filter for online only
Expand Down

0 comments on commit 527c300

Please sign in to comment.