mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 03:14:56 +00:00
Make announcer no longer spam the Discord bridge
This commit is contained in:
parent
0cc0839861
commit
80a240bf09
2 changed files with 13 additions and 3 deletions
|
@ -89,7 +89,7 @@ public class Announcer
|
||||||
current = 0;
|
current = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utilities.bcastMsg(prefix + ANNOUNCEMENTS.get(current));
|
Utilities.bcastMsg(prefix + ANNOUNCEMENTS.get(current), false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -84,14 +84,24 @@ public class Utilities
|
||||||
throw new AssertionError();
|
throw new AssertionError();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void bcastMsg(String message, ChatColor color) {
|
public static void bcastMsg(String message, ChatColor color, boolean transmitToDiscord) {
|
||||||
Log.info(message, true);
|
Log.info(message, true);
|
||||||
|
|
||||||
for (org.bukkit.entity.Player player : Bukkit.getOnlinePlayers()) {
|
for (org.bukkit.entity.Player player : Bukkit.getOnlinePlayers()) {
|
||||||
player.sendMessage((color == null ? "" : color) + message);
|
player.sendMessage((color == null ? "" : color) + message);
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscordBridge.transmitMessage(message);
|
if(transmitToDiscord) {
|
||||||
|
DiscordBridge.transmitMessage(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void bcastMsg(String message, ChatColor color) {
|
||||||
|
bcastMsg(message, color, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void bcastMsg(String message, boolean transmitToDiscord) {
|
||||||
|
bcastMsg(message, null, transmitToDiscord);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void bcastMsg(String message)
|
public static void bcastMsg(String message)
|
||||||
|
|
Loading…
Reference in a new issue