Catching all vanilla broadcasts in Minecraft #44

Merged
NorbiPeti merged 6 commits from dev into master 2017-12-02 19:25:51 +00:00
2 changed files with 6 additions and 4 deletions
Showing only changes of commit 0c9dd6f49a - Show all commits

View file

@ -2,10 +2,10 @@ cache:
directories:
- $HOME/.m2/repository/org/
before_install: | # Wget BuildTools and run if cached folder not found
if [ ! -d "$HOME/.m2/repository/org/spigotmc/spigot/1.12-R0.1-SNAPSHOT" ]; then
if [ ! -d "$HOME/.m2/repository/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT" ]; then
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
# grep so that download counts don't appear in log files
java -jar BuildTools.jar --rev 1.12 | grep -vE "[^/ ]*/[^/ ]*\s*KB\s*$" | grep -v "^\s*$"
java -jar BuildTools.jar --rev 1.12.2 | grep -vE "[^/ ]*/[^/ ]*\s*KB\s*$" | grep -v "^\s*$"
fi
language: java
jdk:

View file

@ -125,8 +125,10 @@ public class DiscordPlugin extends JavaPlugin implements IListener<ReadyEvent> {
if (getConfig().getBoolean("serverup", false)) {
sendMessageToChannel(chatchannel, "", new EmbedBuilder().withColor(Color.YELLOW)
.withTitle("Server recovered from a crash - chat connected.").build());
TBMCCoreAPI.SendException("The server crashed!", new Throwable(
"The server shut down unexpectedly. See the log of the previous run for more details."));
val thr = new Throwable(
"The server shut down unexpectedly. See the log of the previous run for more details.");
thr.setStackTrace(new StackTraceElement[0]);
TBMCCoreAPI.SendException("The server crashed!", thr);
} else
sendMessageToChannel(chatchannel, "", new EmbedBuilder().withColor(Color.GREEN)
.withTitle("Server started - chat connected.").build());