Browse Source

make metrics sending async

fixes #23
MasterCake 2 years ago
parent
commit
d607f8ef1a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/main/java/de/Linus122/TelegramChat/TelegramChat.java

+ 3 - 2
src/main/java/de/Linus122/TelegramChat/TelegramChat.java

@@ -114,8 +114,9 @@ public class TelegramChat extends JavaPlugin implements Listener {
 				connectionLost = !telegramHook.getUpdate();
 			}
 		}, 10L, 10L);
-
-		new Metrics(this);
+		
+		// metrics
+		Bukkit.getScheduler().runTaskAsynchronously(this, () -> new Metrics(this));
 	}
 
 	@Override