|
@@ -44,7 +44,7 @@ public class Main extends JavaPlugin implements Listener {
|
|
Bukkit.getPluginCommand("telegram").setExecutor(new TelegramCmd());
|
|
Bukkit.getPluginCommand("telegram").setExecutor(new TelegramCmd());
|
|
Bukkit.getPluginCommand("linktelegram").setExecutor(new LinkTelegramCmd());
|
|
Bukkit.getPluginCommand("linktelegram").setExecutor(new LinkTelegramCmd());
|
|
Bukkit.getPluginManager().registerEvents(this, this);
|
|
Bukkit.getPluginManager().registerEvents(this, this);
|
|
-
|
|
|
|
|
|
+
|
|
File dir = new File("plugins/TelegramChat/");
|
|
File dir = new File("plugins/TelegramChat/");
|
|
dir.mkdir();
|
|
dir.mkdir();
|
|
data = new Data();
|
|
data = new Data();
|
|
@@ -61,7 +61,7 @@ public class Main extends JavaPlugin implements Listener {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
telegramHook = new Telegram();
|
|
telegramHook = new Telegram();
|
|
telegramHook.auth(data.getToken());
|
|
telegramHook.auth(data.getToken());
|
|
|
|
|
|
@@ -192,7 +192,7 @@ public class Main extends JavaPlugin implements Listener {
|
|
public void onChat(AsyncPlayerChatEvent e) {
|
|
public void onChat(AsyncPlayerChatEvent e) {
|
|
if (!this.getConfig().getBoolean("enable-chatmessages"))
|
|
if (!this.getConfig().getBoolean("enable-chatmessages"))
|
|
return;
|
|
return;
|
|
- if(e.isCancelled())
|
|
|
|
|
|
+ if (e.isCancelled())
|
|
return;
|
|
return;
|
|
if (telegramHook.connected) {
|
|
if (telegramHook.connected) {
|
|
ChatMessageToTelegram chat = new ChatMessageToTelegram();
|
|
ChatMessageToTelegram chat = new ChatMessageToTelegram();
|