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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>TelegramChat</groupId>
|
<groupId>TelegramChat</groupId>
|
||||||
<artifactId>TelegramChat</artifactId>
|
<artifactId>TelegramChat</artifactId>
|
||||||
<version>1.0.12</version>
|
<version>1.0.14</version>
|
||||||
<name>TelegramChat</name>
|
<name>TelegramChat</name>
|
||||||
<url>https://www.spigotmc.org/resources/telegramchat.16576/</url>
|
<url>https://www.spigotmc.org/resources/telegramchat.16576/</url>
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -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();
|
||||||
|
@ -2,12 +2,12 @@ package de.Linus122.TelegramComponents;
|
|||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class ChatMessageToMc extends Cancellable{
|
public class ChatMessageToMc extends Cancellable {
|
||||||
UUID uuid_sender;
|
UUID uuid_sender;
|
||||||
String content;
|
String content;
|
||||||
int chatID_sender;
|
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.uuid_sender = uuid_sender;
|
||||||
this.content = content;
|
this.content = content;
|
||||||
this.chatID_sender = chatID_sender;
|
this.chatID_sender = chatID_sender;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package de.Linus122.TelegramComponents;
|
package de.Linus122.TelegramComponents;
|
||||||
|
|
||||||
public class ChatMessageToTelegram extends Cancellable{
|
public class ChatMessageToTelegram extends Cancellable {
|
||||||
public String text;
|
public String text;
|
||||||
public int chat_id;
|
public int chat_id;
|
||||||
public String parse_mode;
|
public String parse_mode;
|
||||||
|
Loading…
Reference in New Issue
Block a user