Skip to content

Commit

Permalink
update broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
Librazy committed May 4, 2017
1 parent 929c580 commit 87cc204
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ plugins {
id 'org.inferred.processors' version '1.2.11'
}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/cat/nyaa/nyaacore/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ public Message broadcast(World world) {
return this;
}

public Message broadcast(Predicate<Player> playerFilter) {
public Message broadcast(MessageType type, Predicate<Player> playerFilter) {
for (Player player : Bukkit.getOnlinePlayers()) {
if (playerFilter.test(player)) {
this.send(player);
this.send(player, type);
}
}
Bukkit.getConsoleSender().sendMessage(inner.toLegacyText());
Expand Down

0 comments on commit 87cc204

Please sign in to comment.