greatestbanana13
📎 1 file 1,759 chars
📄
pasted-code-1770572126292.txt
txt 63 lines
▶
FrostMessages is a private messaging plugin that replaces Skript-based DMs with a fast, clean system designed for modern Paper/LeafMC servers.

Core Features

Private Messaging:
Players can message each other using /msg  , with aliases like /tell, /w, /dm, /message, and /whisper.

Reply System:
/r  (alias /reply) instantly replies to the last person you messaged.

Social Spy Mode:
Staff can toggle message spying with /msg spy.
When enabled, they will see all private messages in a separate formatted spy line.

Ignore / Block System:
Players can block others using /ignore  (alias /block) and remove them using /unignore .
Blocked players cannot send messages to each other.

Toggle Private Messages:
Players can disable incoming DMs with /togglemsg.
When enabled, nobody can message them until they turn it back on.

Smart Message Handling

Prevents messaging offline players

Prevents empty messages

Prevents messaging players who have DMs disabled

Prevents messaging if either player has blocked the other

Sends clear feedback messages, with optional actionbar + sounds

Fully Configurable

Everything is editable through the config, including:

Message formats (sender + receiver)

Social spy format

All error messages

Prefixes, colors, symbols, arrows, etc.

Whether action bar messages are used

Whether sounds are played

Permissions and toggles

All formatting is modern and supports MiniMessage (including hex colors).

Folia Support

FrostMessages is built with full Folia compatibility, meaning:

No unsafe main-thread blocking

No global synchronous tasks that break region threading

Messaging, reply tracking, ignore checks, and spy broadcasts are handled safely using Folia-friendly scheduling
greatestbanana13
📎 1 file 1,500 chars
📄
pasted-code-1770572198719.txt
txt 57 lines
▶
FrostMessages is a private messaging plugin that replaces Skript-based DMs with a fast, clean system designed for modern Paper/LeafMC servers.

full FOLIA SUPPORT

Core Features

Private Messaging:
Players can message each other using /msg  , with aliases like /tell, /w, /dm, /message, and /whisper.

Reply System:
/r  (alias /reply) instantly replies to the last person you messaged.

Social Spy Mode:
Staff can toggle message spying with /msg spy.
When enabled, they will see all private messages in a separate formatted spy line.

Ignore / Block System:
Players can block others using /ignore  (alias /block) and remove them using /unignore .
Blocked players cannot send messages to each other.

Toggle Private Messages:
Players can disable incoming DMs with /togglemsg.
When enabled, nobody can message them until they turn it back on.

Smart Message Handling

Prevents messaging offline players

Prevents empty messages

Prevents messaging players who have DMs disabled

Prevents messaging if either player has blocked the other

Sends clear feedback messages, with optional actionbar + sounds

Fully Configurable

Everything is editable through the config, including:

Message formats (sender + receiver)

Social spy format

All error messages

Prefixes, colors, symbols, arrows, etc.

Whether action bar messages are used

Whether sounds are played

Permissions and toggles

All formatting is modern and supports MiniMessage (including hex colors).

Kodari AI
KodariFeb 8 at 5:38 pm 13,097 (v2)

I’ll create FrostMessages, a modern private messaging plugin with full Folia support.

FrostMessages
A modern private messaging plugin for Paper and Folia servers featuring /msg and /reply commands, social spy mode for staff, ignore/block system, and DM toggles. Built with MiniMessage support for hex colors and gradients, configurable action bars and sounds, and async-safe Folia scheduling. Designed to replace legacy Skript-based DM systems with a fast, clean solution.

Let me first read the FoliaLib documentation to ensure proper Folia support:

Now I’ll create the complete plugin structure:

✅ FrostMessages plugin created successfully!

Features implemented:

  • /msg <player> <message> with aliases (tell, w, dm, message, whisper)

  • /r <message> for quick replies

  • /msg spy for staff to monitor all messages

  • /ignore <player> and /unignore <player> to block messages

  • /togglemsg to disable all incoming messages

  • Full Folia support using FoliaLib’s entity scheduling

  • MiniMessage formatting with hex colors and gradients

  • Optional action bars and sounds on message receive

  • Social spy excludes sender/receiver from seeing their own messages

  • All messages fully configurable in config.yml

The plugin is ready to compile and use on both Paper and Folia servers!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
15 710
src/main/java/com/frostmessages/FrostMessages.java
package com.frostmessages;

import com.frostmessages.command.*;
import com.frostmessages.manager.IgnoreManager;
import com.frostmessages.manager.MessageManager;
import com.frostmessages.manager.SocialSpyManager;
import com.frostmessages.manager.ToggleManager;
import com.tcoded.folialib.FoliaLib;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class FrostMessages extends JavaPlugin {
    private FoliaLib foliaLib;
    private MessageManager messageManager;
    private IgnoreManager ignoreManager;
    private ToggleManager toggleManager;
    private SocialSpyManager socialSpyManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        foliaLib = new FoliaLib(this);
        
        ignoreManager = new IgnoreManager();
        toggleManager = new ToggleManager();
        socialSpyManager = new SocialSpyManager();
        messageManager = new MessageManager(this, foliaLib);
        
        getCommand("msg").setExecutor(new MessageCommand(this, foliaLib));
        getCommand("r").setExecutor(new ReplyCommand(this, foliaLib));
        getCommand("ignore").setExecutor(new IgnoreCommand(this, foliaLib));
        getCommand("unignore").setExecutor(new UnignoreCommand(this, foliaLib));
        getCommand("togglemsg").setExecutor(new ToggleMsgCommand(this, foliaLib));
        
        getLogger().info("FrostMessages enabled with Folia support!");
    }
    
    @Override
    public void onDisable() {
        if (foliaLib != null) {
            foliaLib.getScheduler().cancelAllTasks();
        }
        getLogger().info("FrostMessages disabled!");
    }
}