untanned
📎 1 file 1,235 chars
📄
pasted-code-1772067406200.txt
txt 76 lines
▶
Create a Minecraft plugin for Spigot/Paper (1.21+) using Java.
The plugin should display broadcast messages in very large text in the center of the player's screen (using Title or ActionBar API).

Requirements:

Command:

/bigbroadcast 

Permission: bigbroadcast.use

Only players with permission can use it.

Functionality:

When the command is executed, the message should appear:

As a large Title (BroadCast)

Optional subtitle support

With customizable fade-in, stay, and fade-out times

The message should be shown to:

All online players

Config File:

config.yml should allow:

Default fade-in time

Default stay time

Default fade-out time

Title color (support HEX colors)

Sound effect when broadcast appears

Enable/disable subtitle

Extra Features (Optional but Preferred):

PlaceholderAPI support

MiniMessage color format support

Console support (console can execute the command)

Reload command: /bigbroadcast reload

Plugin Structure:

Main class extending JavaPlugin

Command executor class

Config manager class

Proper plugin.yml

Compatibility:

Must work with Spigot and Paper

Use modern API methods (avoid deprecated functions)

Code Quality:

Well-structured

Commented code

Error handling included
Kodari AI
KodariFeb 26 at 12:58 am 11,144 (v2)

I’ll create a modern broadcast plugin with MiniMessage support and Title API for Paper 1.21+.

BigBroadcast
A powerful broadcast plugin that displays large, customizable title messages to all players. Features MiniMessage color formatting with HEX support, configurable fade timings, sound effects, PlaceholderAPI integration, and subtitle support. Includes an in-game reload command and full console compatibility for server-wide announcements.

Plugin created successfully! Here’s what was implemented:

Core Features:

  • /bigbroadcast <message> - Broadcasts large title to all players

  • /bigbroadcast reload - Reloads configuration

  • Full MiniMessage support with gradients, HEX colors, and formatting

  • Customizable fade-in, stay, and fade-out times

  • Optional subtitle with configurable text

  • Sound effects on broadcast (XSound for cross-version support)

  • PlaceholderAPI integration (auto-detects if available)

  • Console command support

  • Permission system (bigbroadcast.use and bigbroadcast.reload)

Config Features:

  • Customizable timings (fade-in, stay, fade-out in ticks)

  • Title color prefix with MiniMessage format (supports gradients & HEX)

  • Subtitle toggle and custom text

  • Sound configuration (type, volume, pitch)

  • PlaceholderAPI toggle

Technical Implementation:

  • Uses modern Adventure API (Component & Title)

  • MiniMessage for advanced color formatting

  • XSound for cross-version sound compatibility

  • Lombok for clean code (@Getter annotations)

  • Proper error handling and permission checks

  • Console and player sender support

The plugin is fully compatible with Paper 1.21+ and uses modern, non-deprecated APIs.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 264
src/main/java/com/bigbroadcast/BigBroadcastPlugin.java
package com.bigbroadcast;

import com.bigbroadcast.commands.BigBroadcastCommand;
import com.bigbroadcast.config.ConfigManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class BigBroadcastPlugin extends JavaPlugin {
    private ConfigManager configManager;
    
    @Override
    public void onEnable() {
        configManager = new ConfigManager(this);
        
        BigBroadcastCommand broadcastCommand = new BigBroadcastCommand(this);
        getCommand("bigbroadcast").setExecutor(broadcastCommand);
        
        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            getLogger().info("PlaceholderAPI found! Placeholder support enabled.");
        } else {
            getLogger().info("PlaceholderAPI not found. Placeholder support disabled.");
        }
        
        getLogger().info("BigBroadcast has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("BigBroadcast has been disabled!");
    }
}