NoticeExpress
A Minecraft Fabric mod for server announcements and notices with optional client-side GUI enhancement.
- Features
- Requirements
- Installation
- Commands
- Chat Display Format
- Configuration
- Database
- Permissions
- Client GUI (Coming Soon)
- For Developers
- Roadmap
- Contributing
- License
Features
- 📢 Server-side Notice Management - Create, delete, pin, and manage server announcements
- 💾 Persistent Storage - SQLite database for reliable notice storage
- 🎨 Dual Display Modes - Chat-based notifications (fallback) and optional client GUI
- 📌 Pin Important Notices - Highlight critical announcements
- 🔐 Permission System - OP level 3 required for notice management
- ⚙️ Configurable - JSON-based configuration system
Requirements
- Minecraft: 1.21.7
- Fabric Loader: 0.18.4 or higher
- Fabric API: 0.129.0+1.21.7 or higher
- Java: 21 or higher
Installation
Server-side (Required)
- Download the mod JAR file
- Place it in your server's
modsfolder - Start the server
- Configuration will be generated at
config/noticeexpress/config.json
Client-side (Optional)
- Download the same mod JAR file
- Place it in your client's
modsfolder - Enjoy enhanced GUI features (coming soon)
Commands
All commands start with /notice:
Management Commands (OP Level 3+)
Publish a Notice
/notice publish <title> <content>
Example:
/notice publish "Server Maintenance" "The server will be down for maintenance on Saturday from 2-4 PM."
Delete a Notice
/notice delete <id>
Example:
/notice delete 1
Pin a Notice
/notice pin <id>
Example:
/notice pin 2
Unpin a Notice
/notice unpin <id>
Example:
/notice unpin 2
Viewing Commands (All Players)
List All Notices
/notice list
Shows a compact list of all notices with their IDs and titles.
Show Full Notices
/notice show
Displays all notices with full content in chat.
Chat Display Format
When viewing notices in chat, they appear in the following format:
[Publisher] [YYYY/MM/DD HH:mm] [PINNED]
Title (in gold, bold)
Content (in white, supports multiple lines)
Example:
[Admin] [2026/02/02 12:30] [PINNED]
Server Maintenance
The server will be down for maintenance on Saturday from 2-4 PM.
Please save your progress before then.
Configuration
Configuration file location: config/noticeexpress/config.json
{
"serverTitle": "Server Announcements",
"databasePath": "config/noticeexpress/notices.db"
}
Configuration Options
- serverTitle: The title displayed in the client GUI (default: "Server Announcements")
- databasePath: Path to the SQLite database file (default: "config/noticeexpress/notices.db")
Database
NoticeExpress uses SQLite for persistent storage. The database is automatically created and managed.
Database Schema
CREATE TABLE notices (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
publisher TEXT NOT NULL,
publisher_uuid TEXT NOT NULL,
content TEXT NOT NULL,
timestamp INTEGER NOT NULL,
is_pinned INTEGER NOT NULL DEFAULT 0,
created_at INTEGER NOT NULL
)
Permissions
The mod uses Minecraft's built-in OP system:
- OP Level 3+: Can publish, delete, pin, and unpin notices
- All Players: Can view notices using
/notice listand/notice show
Client GUI (Coming Soon)
The optional client-side mod will provide an enhanced GUI with:
- 📋 Scrollable notice list
- 🎴 Beautiful notice cards
- 📌 Visual pinned indicators
- ✨ Expand/collapse functionality
- 🖱️ Click-to-interact interface
For Developers
Building from Source
- Clone the repository:
git clone https://github.com/0x002500/NoticeExpress.git
cd NoticeExpress
- Build the mod:
./gradlew build
- Find the compiled JAR in
build/libs/
Project Structure
src/
├── main/
│ ├── java/top/orderly/noticeexpress/
│ │ ├── NoticeExpress.java # Main mod class
│ │ ├── command/
│ │ │ └── NoticeCommand.java # Command registration and handlers
│ │ ├── config/
│ │ │ └── ModConfig.java # Configuration management
│ │ ├── database/
│ │ │ ├── DatabaseManager.java # SQLite connection manager
│ │ │ └── NoticeRepository.java # CRUD operations
│ │ ├── model/
│ │ │ └── Notice.java # Notice entity
│ │ └── util/
│ │ ├── ChatNotificationFormatter.java # Chat formatting
│ │ ├── PermissionChecker.java # Permission utilities
│ │ └── TimeFormatter.java # Time formatting
│ └── resources/
│ ├── fabric.mod.json # Mod metadata
│ └── assets/noticeexpress/
│ └── icon.png # Mod icon
└── client/
└── java/top/orderly/noticeexpress/
├── NoticeExpressClient.java # Client initialization
└── ui/ # GUI components (coming soon)
API Usage
Creating a Notice Programmatically
import top.orderly.noticeexpress.NoticeExpress;
import top.orderly.noticeexpress.model.Notice;
Notice notice = new Notice();
notice.setTitle("My Notice");
notice.setPublisher("System");
notice.setPublisherUuid(UUID.randomUUID());
notice.setContent("This is a programmatically created notice.");
NoticeExpress.getNoticeRepository().createNotice(notice);
Retrieving Notices
import top.orderly.noticeexpress.NoticeExpress;
import top.orderly.noticeexpress.model.Notice;
import java.util.List;
// Get all notices
List<Notice> allNotices = NoticeExpress.getNoticeRepository().getAllNotices();
// Get a specific notice by ID
Notice notice = NoticeExpress.getNoticeRepository().getNoticeById(1);
// Get notices since a timestamp
long timestamp = System.currentTimeMillis() - 86400000; // Last 24 hours
List<Notice> recentNotices = NoticeExpress.getNoticeRepository().getNoticesSince(timestamp);
Roadmap
- Client-side GUI
- Network packet communication
- Player join notifications
- Localization support (English & Chinese)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'feat: add some amazing feature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Commit Message Convention
This project follows Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
