From d997042e1a8c86fb21930b6c8d1fe126f0cff417 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Fri, 18 Aug 2017 02:27:19 +0200 Subject: [PATCH] Hopefully fixed channel registration and deploy --- ButtonCore/src/main/java/buttondevteam/lib/chat/Channel.java | 3 ++- deploy.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ButtonCore/src/main/java/buttondevteam/lib/chat/Channel.java b/ButtonCore/src/main/java/buttondevteam/lib/chat/Channel.java index 43e00ea..f05cc3b 100644 --- a/ButtonCore/src/main/java/buttondevteam/lib/chat/Channel.java +++ b/ButtonCore/src/main/java/buttondevteam/lib/chat/Channel.java @@ -94,7 +94,8 @@ public class Channel { static void RegisterChannel(Channel channel) { channels.add(channel); - Bukkit.getPluginManager().callEvent(new ChatChannelRegisterEvent(channel)); + Bukkit.getScheduler().runTask(MainPlugin.Instance, + () -> Bukkit.getPluginManager().callEvent(new ChatChannelRegisterEvent(channel))); // Wait for server start } public static class RecipientTestResult { diff --git a/deploy.sh b/deploy.sh index 606423b..74bdab7 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,5 +1,5 @@ #!/bin/sh -FILENAME=$(find target/ -maxdepth 1 ! -name '*original*' -name '*.jar') +FILENAME=$(find ButtonCore/target/ -maxdepth 1 ! -name '*original*' -name '*.jar') echo Found file: $FILENAME if [ $1 = 'production' ]; then