Skip to content

0x002500/NoticeExpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NoticeExpress

A Minecraft Fabric mod for server announcements and notices with optional client-side GUI enhancement.

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)

  1. Download the mod JAR file
  2. Place it in your server's mods folder
  3. Start the server
  4. Configuration will be generated at config/noticeexpress/config.json

Client-side (Optional)

  1. Download the same mod JAR file
  2. Place it in your client's mods folder
  3. 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 list and /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

  1. Clone the repository:
git clone https://github.com/0x002500/NoticeExpress.git
cd NoticeExpress
  1. Build the mod:
./gradlew build
  1. 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: add some amazing feature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Commit Message Convention

This project follows Conventional Commits:

  • feat: - New features
  • fix: - Bug fixes
  • docs: - Documentation changes
  • style: - Code style changes (formatting, etc.)
  • refactor: - Code refactoring
  • test: - Adding or updating tests
  • chore: - Maintenance tasks

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

About

A awesome way to send server annocouncment.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages