Skip to content

Commit

Permalink
Update 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LazizbekDeveloper committed Nov 5, 2024
1 parent f3f7b6e commit cba6dea
Show file tree
Hide file tree
Showing 18 changed files with 625 additions and 188 deletions.
233 changes: 155 additions & 78 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# TelegramLogger 🚀
[![Java](https://img.shields.io/badge/Java-8%2B-orange)](https://www.java.com)
[![Spigot](https://img.shields.io/badge/Spigot-1.16--1.21-yellow)](https://www.spigotmc.org)
[![Version](https://img.shields.io/badge/version-3.0.0-brightgreen)](https://github.com/LazizbekDeveloper/TelegramLogger/releases)
[![Version](https://img.shields.io/badge/version-4.0.0-brightgreen)](https://github.com/LazizbekDeveloper/TelegramLogger/releases)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Downloads](https://img.shields.io/badge/downloads-1K%2B-blue)](https://www.spigotmc.org/resources/120590)

<div align="center">
<img src="https://minecraft.wiki/images/Mojang_logo.svg" width="100px" />
<img src="https://minecraft.wiki/images/Mojang_logo.svg" width="96px" />
--->
<img src="https://telegram.org/img/t_logo.svg" width="100px" />
<img src="https://telegram.org/img/t_logo.svg" width="96px" />
</div>

Connect your Minecraft server with Telegram! Monitor all server activities in real-time through your Telegram group or channel.
Expand All @@ -21,7 +21,8 @@ Connect your Minecraft server with Telegram! Monitor all server activities in re
- **Death Tracking**: Player deaths with detailed messages
- **Advancement System**: Player achievements and advancements
- **World Monitoring**: Track player world changes
- **Command Logging**: Monitor command executions (NEW!)
- **Command Logging**: Monitor command executions
- **Console Logging**: Real-time console output forwarding (NEW!)
- **Auto-Update**: Version checking and update notifications

### 🛡️ Advanced Chat & Command System
Expand All @@ -30,20 +31,23 @@ Connect your Minecraft server with Telegram! Monitor all server activities in re
- **Thread Support**: Organize messages in forum topics
- **Sudo Commands**: Execute server commands via Telegram
- **Channel Separation**: Different channels for different events
- **Console Monitoring**: Separate channel for console logs (NEW!)

### 🎮 Admin Features
- **Remote Control**: Manage server through Telegram
- **Admin System**: Register Telegram admins
- **Statistics**: Detailed message and event statistics
- **Debug Mode**: Advanced troubleshooting options
- **Real-time Monitoring**: Live server status updates
- **Multi-Channel**: Separate channels for different logs (NEW!)

### 🎨 Customization
- **Message Templates**: Fully customizable messages
- **HTML Formatting**: Rich text support with HTML
- **Emoji Support**: Built-in emoji for messages
- **Multi-language**: Supports all languages
- **Placeholder System**: Dynamic message variables
- **Thread Organization**: Forum topic support for each feature (NEW!)

## 📋 Requirements
- Java 8 or newer
Expand All @@ -61,64 +65,29 @@ Connect your Minecraft server with Telegram! Monitor all server activities in re
7. Configure `config.yml`
8. Reload plugin with `/tl reload`

## 📝 Default Configuration
```yaml
# ===========================================
# TelegramLogger Configuration
# ===========================================
## 🔄 New Features in v4.0.0

# Bot Settings
bot_token: "BOT_TOKEN" # Your bot token from @BotFather
chat_id: "CHAT_ID" # Main chat/channel ID
thread_id: "THREAD_ID" # Optional forum topic ID
send_to_thread: false # Use thread for messages
send_telegram_messages_to_game: true
### 🖥️ Console Logging
- Real-time console output forwarding
- Separate channel support
- Thread organization
- Custom message format
- Filtered logging options

# Message Settings
plugin_prefix: "&6&lTelegramLogger&7 ➜ &r&a"
telegram_game_message: "&7[&9TG&7] &c%name% &8» &f%message%"
### 📊 Enhanced Statistics
- Console log statistics
- Command execution tracking
- Filtered message counts
- Thread usage metrics

# Event Settings
enable_join: true # Player join messages
enable_leave: true # Player leave messages
enable_chat: true # Chat messages
enable_advancement: true # Achievement messages
enable_death: true # Death messages
enable_world_switch: true # World change messages
### 🧩 Multi-Channel Support
- Different channels for:
- Console logs
- Command executes
- Chat messages
- Player events

# Message Templates [With HTML Support]
join_message: "<blockquote>ㅤㅤㅤㅤㅤ\n ➕ <b><u>%player%</u></b> joined the game! (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
leave_message: "<blockquote>ㅤㅤㅤㅤㅤ\n ➖ <b><u>%player%</u></b> left the game! (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
chat_message: "<b><u>%player%</u></b> <b>➥</b> %message%"
advancement_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 🏆 <b><u>%player%</u></b> made the advancement <u>[%advancement%]</u>\nㅤㅤㅤㅤ</blockquote>"
death_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 💀 <b><u>%player%</u></b> death: %death_message%\nㅤㅤㅤㅤ</blockquote>"
world_switch_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 🌍 <b><u>%player%</u></b> moved from <u>%from_world%</u> to <u>%to_world%</u>\nㅤㅤㅤㅤ</blockquote>"

# Chat Filter
enable_chat_filter: true
filtered_words:
- "badword1"
- "badword2"
filtered_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 🚫 <b><u>%player%</u></b> used a filtered word.\nㅤㅤㅤㅤ</blockquote>"

# Command Executes
enable_send_command_executes: false # Enable command logging
command_executes_chat_id: "CHAT_ID" # Separate chat for commands
send_command_executes_to_thread: false
command_executes_group_thread_id: "THREAD_ID"
command_execute_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 💠 <b><u>%player%</u></b> <b>➥</b> %command%\nㅤㅤㅤㅤ</blockquote>"

# Ignored Commands
ignored_commands:
- "/login"
- "/register"

# Advanced Settings
debug_mode: false # Enable debug logging
version: "3.0.0" # DO NOT EDIT
```
## 🎯 Commands & Permissions
### 🎯 Commands & Permissions

### Admin Commands
| Command | Permission | Description |
Expand Down Expand Up @@ -150,7 +119,7 @@ version: "3.0.0" # DO NOT EDIT
| `/players` | List online players |
| `/help` | Show Telegram commands |

## 📖 Placeholders
## 📖 Extended Placeholders
| Placeholder | Description |
|-------------|-------------|
| `%player%` | Player username |
Expand All @@ -163,29 +132,137 @@ version: "3.0.0" # DO NOT EDIT
| `%death_message%` | Death message |
| `%from_world%` | Previous world |
| `%to_world%` | New world |
| `%log%` | Console log message (NEW!) |
| `%time%` | Current time (NEW!) |

## 🔧 Configuration Guide
## 🔧 Advanced Configuration Guide

### Basic Setup
1. Create Telegram bot via [@BotFather](https://t.me/botfather)
2. Get bot token
3. Add bot to your group/channel
4. Get chat ID using [@RawDataBot](https://t.me/rawdatabot)
5. Configure `config.yml`
6. Reload plugin
### Console Logging Setup
1. Enable console logging:
```yaml
enable_send_console_logs: true
```
2. Configure console log channel:
```yaml
console_log_chat_id: "YOUR_CHAT_ID"
```
3. Optional thread support:
```yaml
send_console_log_to_thread: true
console_log_group_thread_id: "THREAD_ID"
```
4. Customize message format:
```yaml
console_log_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 🖥️ <b><u>Console Log</u></b> <b>➥</b> %log% . (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
```
## 📝 Default Configuration
```yaml
# ===========================================
# TelegramLogger Configuration
# Developer by LazizbekDev
# Telegram: https://t.me/LazizbekDev
# ===========================================

# Bot Configuration
# -------------------------------------------
bot_token: "BOT_TOKEN" # Your Telegram bot token
chat_id: "CHAT_ID" # Your Telegram chat ID
thread_id: "THREAD_ID" # Thread ID (for forum topics)
send_to_thread: false
send_telegram_messages_to_game: true

# Message Prefix
# -------------------------------------------
plugin_prefix: "&6&lTelegramLogger&7 ➜ &r&a"
telegram_game_message: "&7[&9TG&7] &c%name% &8» &f%message%"
# Available placeholders: %name%, %message%

# Join Messages
# -------------------------------------------
enable_join: true
join_message: "<blockquote>ㅤㅤㅤㅤㅤ\n ➕ <b><u>%player%</u></b> joined the game! (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
# Available placeholders: %player%, %displayname%, %online%, %max%

# Leave Messages
# -------------------------------------------
enable_leave: true
leave_message: "<blockquote>ㅤㅤㅤㅤㅤ\n ➖ <b><u>%player%</u></b> left the game! (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
# Available placeholders: %player%, %displayname%, %online%, %max%

# Chat Messages
# -------------------------------------------
enable_chat: true
chat_message: "<b><u>%player%</u></b> <b>➥</b> %message%"
# Available placeholders: %player%, %displayname%, %message%, %online%, %max%

# Advancement Messages
# -------------------------------------------
enable_advancement: true
advancement_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 🏆 <b><u>%player%</u></b> made the advancement <u>[%advancement%]</u> (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
# Available placeholders: %player%, %displayname%, %advancement%, %online%, %max%

# Death Messages
# -------------------------------------------
enable_death: true
death_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 💀 <b><u>%player%</u></b> death: %death_message% (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
# Available placeholders: %player%, %displayname%, %death_message%, %online%, %max%

# World Switch Messages
# -------------------------------------------
enable_world_switch: true
world_switch_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 🌍 <b><u>%player%</u></b> moved from <u>%from_world%</u> to <u>%to_world%</u> (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
# Available placeholders: %player%, %displayname%, %from_world%, %to_world%, %online%, %max%

# Chat Filter
# -------------------------------------------
enable_chat_filter: true
filtered_words:
- "badword1"
- "badword2"
filtered_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 🚫 <b><u>%player%</u></b> used a filtered word. (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
# Available placeholders: %player%, %displayname%, %online%, %max%

# Command Executes
enable_send_command_executes: false
command_execute_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 💠 <b><u>%player%</u></b> <b>➥</b> %command% . (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
command_executes_chat_id: "CHAT_ID"
send_command_executes_to_thread: false
command_executes_group_thread_id: "THREAD_ID"
ignored_commands:
- "/login"
- "/register"
# Available placeholders: %player%, %displayname%, %command%, %online%, %max%

# Console Logs
enable_send_console_logs: false
console_log_message: "<blockquote>ㅤㅤㅤㅤㅤ\n 🖥️ <b><u>Console Log</u></b> <b>➥</b> %log% . (Online: %online%/%max%)\nㅤㅤㅤㅤ</blockquote>"
console_log_chat_id: "CHAT_ID"
send_console_log_to_thread: false
console_log_group_thread_id: "THREAD_ID"
ignored_log_tags: []
# Available placeholders: %log%, %online%, %max%

#Telegram Sudo Command
enable_sudo_command: true

# Debug Mode (Advanced users only)
# -------------------------------------------
debug_mode: false

# Plugin Version (DO NOT EDIT)
# -------------------------------------------
version: "4.0.0"
```
### Thread Support
1. Enable forum in your group
2. Create topic
3. Get thread ID from message URL
4. Set `send_to_thread: true`
5. Configure `thread_id`

### Command Tracking
1. Set `enable_send_command_executes: true`
2. Configure `command_executes_chat_id`
3. Add commands to `ignored_commands`
4. Customize `command_execute_message`
2. Create topics for:
- General messages
- Console logs
- Command executes
3. Get thread IDs
4. Configure in `config.yml`

### HTML Formatting
- `<b>text</b>` - Bold
Expand Down Expand Up @@ -215,4 +292,4 @@ This project is licensed under the MIT License. See [LICENSE](LICENSE) file.
<b>Made with ❤️ by <a href="https://t.me/LazizbekDev">LazizbekDev</a></b>
<br><br>
If you find this plugin helpful, please give it a ⭐ on GitHub!
</div>
</div>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

<groupId>uz.lazizbekdev</groupId>
<artifactId>TelegramLogger</artifactId>
<version>3.0.0</version>
<version>4.0.0</version>
<packaging>jar</packaging>

<name>TelegramLogger</name>
<description>Forward Minecraft server events to Telegram</description>
<description>Connect your Minecraft server with Telegram! Monitor all server activities in real-time through your Telegram group or channel.</description>

<properties>
<java.version>1.8</java.version>
Expand Down
Loading

0 comments on commit cba6dea

Please sign in to comment.