feat: major update v1.1.0 - improved documentation, configuration and compatibility
- Add comprehensive documentation in docs/ folder - Update README.md with modern design and badges - Improve configuration with new options (GUI, limits, notifications) - Add support for Minecraft 1.19.2-1.21.4 and Java 17+ - Create GPL-3.0 license - Add modrinth/ folder with project description for publishing - Add CONTRIBUTING.md for contributors - Update plugin.yml with aliases and better permissions - Improve build.gradle.kts with better compatibility and encoding - Update .gitignore for cleaner repository
This commit is contained in:
parent
da356e491c
commit
55df7d97b2
14 changed files with 1582 additions and 73 deletions
|
|
@ -36,7 +36,11 @@ public class PostgreSQLDatabaseManager implements DatabaseManager {
|
|||
@Override
|
||||
public void initialize() {
|
||||
try {
|
||||
// Explicitly load PostgreSQL driver
|
||||
Class.forName("org.postgresql.Driver");
|
||||
|
||||
HikariConfig config = new HikariConfig();
|
||||
config.setDriverClassName("org.postgresql.Driver");
|
||||
config.setJdbcUrl("jdbc:postgresql://" + host + ":" + port + "/" + database);
|
||||
config.setUsername(username);
|
||||
config.setPassword(password);
|
||||
|
|
@ -49,6 +53,8 @@ public class PostgreSQLDatabaseManager implements DatabaseManager {
|
|||
dataSource = new HikariDataSource(config);
|
||||
createTables();
|
||||
logger.info("PostgreSQL database initialized: " + host + ":" + port + "/" + database);
|
||||
} catch (ClassNotFoundException e) {
|
||||
logger.log(Level.SEVERE, "PostgreSQL driver not found", e);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Failed to initialize PostgreSQL database", e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,52 @@
|
|||
# Discord Webhook URL
|
||||
# Discord Webhook URL для уведомлений
|
||||
webhook-url: ""
|
||||
|
||||
# Database settings
|
||||
# Настройки базы данных
|
||||
database:
|
||||
# Type: sqlite or postgresql
|
||||
# Тип БД: sqlite или postgresql
|
||||
type: "sqlite"
|
||||
|
||||
# SQLite settings
|
||||
# Настройки SQLite
|
||||
sqlite:
|
||||
file: "reports.db"
|
||||
|
||||
# PostgreSQL settings
|
||||
# Настройки PostgreSQL
|
||||
postgresql:
|
||||
host: "localhost"
|
||||
port: 5432
|
||||
database: "lorep"
|
||||
username: "lorep"
|
||||
database: "loreport"
|
||||
username: "loreport"
|
||||
password: "password"
|
||||
pool-size: 10
|
||||
|
||||
# Messages
|
||||
# Настройки GUI
|
||||
gui:
|
||||
# Количество репортов на странице
|
||||
reports-per-page: 45
|
||||
# Автообновление GUI (в тиках, 20 тиков = 1 секунда)
|
||||
auto-refresh: 100
|
||||
# Показывать головы игроков в GUI
|
||||
show-player-heads: true
|
||||
|
||||
# Ограничения
|
||||
limits:
|
||||
# Максимальная длина причины репорта
|
||||
max-reason-length: 100
|
||||
# Кулдаун между репортами (в секундах)
|
||||
report-cooldown: 30
|
||||
# Максимум репортов на одного игрока от одного отправителя
|
||||
max-reports-per-player: 3
|
||||
|
||||
# Уведомления
|
||||
notifications:
|
||||
# Уведомлять администраторов о новых репортах
|
||||
notify-admins: true
|
||||
# Звук уведомления для администраторов
|
||||
admin-notification-sound: "BLOCK_NOTE_BLOCK_PLING"
|
||||
# Уведомлять игрока о принятии репорта
|
||||
notify-reporter: true
|
||||
|
||||
# Сообщения
|
||||
messages:
|
||||
report-sent: "&aРепорт успешно отправлен!"
|
||||
already-reported: "&cВы уже отправляли репорт на этого игрока!"
|
||||
|
|
@ -33,3 +60,7 @@ messages:
|
|||
stats-last-online: "&eПоследний онлайн: &f%time%"
|
||||
stats-report-entry: "&7- %reason% &8(%time% назад)"
|
||||
gui-title: "Репорты - Страница %page%"
|
||||
cooldown: "&cПодождите %time% секунд перед следующим репортом!"
|
||||
reason-too-long: "&cПричина слишком длинная! Максимум %max% символов."
|
||||
max-reports-reached: "&cВы уже отправили максимальное количество репортов на этого игрока!"
|
||||
admin-notification: "&6[Loreport] &eНовый репорт от &f%reporter% &eна &f%reported%: &7%reason%"
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
name: lorep
|
||||
name: Loreport
|
||||
version: ${version}
|
||||
main: dev.loki.lorep.LorepPlugin
|
||||
api-version: '1.21'
|
||||
author: loki
|
||||
description: Player report system with Discord integration
|
||||
api-version: '1.19'
|
||||
author: loki5512344
|
||||
description: Modern player report system with Discord integration and GUI
|
||||
website: https://codeberg.org/loki5512344/Loreport
|
||||
|
||||
commands:
|
||||
report:
|
||||
description: Report a player or manage reports
|
||||
usage: /report <player> <reason> | /report gui | /report stats <player>
|
||||
permission: lorep.report
|
||||
aliases: [rep, reports]
|
||||
|
||||
permissions:
|
||||
lorep.report:
|
||||
|
|
@ -18,3 +20,9 @@ permissions:
|
|||
lorep.admin:
|
||||
description: Allows access to admin commands (gui, stats)
|
||||
default: op
|
||||
lorep.*:
|
||||
description: Gives access to all Loreport permissions
|
||||
default: false
|
||||
children:
|
||||
lorep.report: true
|
||||
lorep.admin: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue