rearranged code
This commit is contained in:
parent
c421d118e1
commit
74520b2bc2
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>TelegramChat</groupId>
|
||||
<artifactId>TelegramChat</artifactId>
|
||||
<version>1.0.12</version>
|
||||
<version>1.0.14</version>
|
||||
<name>TelegramChat</name>
|
||||
<url>https://www.spigotmc.org/resources/telegramchat.16576/</url>
|
||||
<repositories>
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user