src/main/java/dev/viper/telegramchat/TelegramCommand.java aktualisiert
This commit is contained in:
@@ -22,8 +22,8 @@ public class TelegramCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Wenn keine Argumente angegeben wurden, standardmäßig den Telegram-Modus aktivieren
|
||||
if (args.length == 0) {
|
||||
// Wechsel in Telegram-Chatmodus
|
||||
chatModeManager.setMode(player.getUniqueId(), ChatModeManager.ChatMode.TELEGRAM);
|
||||
String msg = plugin.getConfig().getString("messages.mode-set-telegram", "Du bist jetzt im Telegram-Chatmodus.");
|
||||
player.sendMessage(ChatColor.translateAlternateColorCodes('&', msg));
|
||||
@@ -32,6 +32,22 @@ public class TelegramCommand implements CommandExecutor {
|
||||
|
||||
String sub = args[0].toLowerCase();
|
||||
|
||||
// Befehl: /tg on
|
||||
if (sub.equals("on")) {
|
||||
chatModeManager.setMode(player.getUniqueId(), ChatModeManager.ChatMode.TELEGRAM);
|
||||
String msg = plugin.getConfig().getString("messages.mode-set-telegram", "Du bist jetzt im Telegram-Chatmodus.");
|
||||
player.sendMessage(ChatColor.translateAlternateColorCodes('&', msg));
|
||||
return true;
|
||||
}
|
||||
|
||||
// Befehl: /tg off
|
||||
if (sub.equals("off")) {
|
||||
chatModeManager.setMode(player.getUniqueId(), ChatModeManager.ChatMode.MINECRAFT);
|
||||
String msg = plugin.getConfig().getString("messages.mode-set-minecraft", "Du bist jetzt im Minecraft-Chatmodus.");
|
||||
player.sendMessage(ChatColor.translateAlternateColorCodes('&', msg));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (sub.equals("info")) {
|
||||
player.sendMessage(ChatColor.DARK_GRAY + "=== TelegramChatBridge Info ===");
|
||||
player.sendMessage(ChatColor.GRAY + "Version: " + ChatColor.WHITE + plugin.getDescription().getVersion());
|
||||
@@ -54,6 +70,8 @@ public class TelegramCommand implements CommandExecutor {
|
||||
if (sub.equals("help")) {
|
||||
player.sendMessage(ChatColor.GREEN + "=== TelegramChatBridge Befehle ===");
|
||||
player.sendMessage(ChatColor.YELLOW + "/tg" + ChatColor.WHITE + " - Wechsel in Telegram-Chatmodus");
|
||||
player.sendMessage(ChatColor.YELLOW + "/tg on" + ChatColor.WHITE + " - Aktiviert den Telegram-Chatmodus");
|
||||
player.sendMessage(ChatColor.YELLOW + "/tg off" + ChatColor.WHITE + " - Deaktiviert den Telegram-Chatmodus (Normaler Chat)");
|
||||
player.sendMessage(ChatColor.YELLOW + "/tg info" + ChatColor.WHITE + " - Plugin-Informationen anzeigen");
|
||||
player.sendMessage(ChatColor.YELLOW + "/tg help" + ChatColor.WHITE + " - Diese Hilfe anzeigen");
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user