From 74520b2bc2f688870f1eaf4ca95b46128ce0bdf8 Mon Sep 17 00:00:00 2001 From: mastercake10 Date: Mon, 21 May 2018 17:17:12 +0200 Subject: [PATCH] rearranged code --- pom.xml | 2 +- src/main/java/de/Linus122/TelegramChat/Main.java | 6 +++--- .../de/Linus122/TelegramComponents/ChatMessageToMc.java | 6 +++--- .../Linus122/TelegramComponents/ChatMessageToTelegram.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 9d2aa29..e81857d 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 TelegramChat TelegramChat - 1.0.12 + 1.0.14 TelegramChat https://www.spigotmc.org/resources/telegramchat.16576/ diff --git a/src/main/java/de/Linus122/TelegramChat/Main.java b/src/main/java/de/Linus122/TelegramChat/Main.java index 2a699a4..ab336e1 100755 --- a/src/main/java/de/Linus122/TelegramChat/Main.java +++ b/src/main/java/de/Linus122/TelegramChat/Main.java @@ -44,7 +44,7 @@ public class Main extends JavaPlugin implements Listener { Bukkit.getPluginCommand("telegram").setExecutor(new TelegramCmd()); Bukkit.getPluginCommand("linktelegram").setExecutor(new LinkTelegramCmd()); Bukkit.getPluginManager().registerEvents(this, this); - + File dir = new File("plugins/TelegramChat/"); dir.mkdir(); data = new Data(); @@ -61,7 +61,7 @@ public class Main extends JavaPlugin implements Listener { e.printStackTrace(); } } - + telegramHook = new Telegram(); telegramHook.auth(data.getToken()); @@ -192,7 +192,7 @@ public class Main extends JavaPlugin implements Listener { public void onChat(AsyncPlayerChatEvent e) { if (!this.getConfig().getBoolean("enable-chatmessages")) return; - if(e.isCancelled()) + if (e.isCancelled()) return; if (telegramHook.connected) { ChatMessageToTelegram chat = new ChatMessageToTelegram(); diff --git a/src/main/java/de/Linus122/TelegramComponents/ChatMessageToMc.java b/src/main/java/de/Linus122/TelegramComponents/ChatMessageToMc.java index d48ac6a..c2a9e1f 100644 --- a/src/main/java/de/Linus122/TelegramComponents/ChatMessageToMc.java +++ b/src/main/java/de/Linus122/TelegramComponents/ChatMessageToMc.java @@ -2,12 +2,12 @@ package de.Linus122.TelegramComponents; import java.util.UUID; -public class ChatMessageToMc extends Cancellable{ +public class ChatMessageToMc extends Cancellable { UUID uuid_sender; String content; int chatID_sender; - - public ChatMessageToMc(UUID uuid_sender, String content, int chatID_sender){ + + public ChatMessageToMc(UUID uuid_sender, String content, int chatID_sender) { this.uuid_sender = uuid_sender; this.content = content; this.chatID_sender = chatID_sender; diff --git a/src/main/java/de/Linus122/TelegramComponents/ChatMessageToTelegram.java b/src/main/java/de/Linus122/TelegramComponents/ChatMessageToTelegram.java index f49615b..83e6a3f 100755 --- a/src/main/java/de/Linus122/TelegramComponents/ChatMessageToTelegram.java +++ b/src/main/java/de/Linus122/TelegramComponents/ChatMessageToTelegram.java @@ -1,6 +1,6 @@ package de.Linus122.TelegramComponents; -public class ChatMessageToTelegram extends Cancellable{ +public class ChatMessageToTelegram extends Cancellable { public String text; public int chat_id; public String parse_mode;