Maheshxmafia

Create a Minecraft Paper 1.21.11 plugin named MonsoonWelcome.

When a player joins the server, create an impressive but lightweight welcome sequence.

  1. CENTER TITLE

Show this title in the center of the player's screen:

&5&lWELCOME TO MONSOON SMP

Subtitle:

&d&lSEASON 4 &8• &fSURVIVAL SMP

Title animation:

* Fade In: 10 ticks * Stay: 60 ticks * Fade Out: 20 ticks

  1. JOIN SOUND

Play a welcome sound when the player joins.

Use a suitable Minecraft sound such as:

ENTITY_PLAYER_LEVELUP

Make the sound configurable in config.yml.

  1. PARTICLES

Spawn a short purple-themed particle effect around the player when they join.

Use particles such as:

* PORTAL * END_ROD

The effect should last only a few seconds and must not cause server lag.

  1. CHAT MESSAGE

Send:

&8&m━━━━━━━━━━━━━━━━━━━━━━ &5&l✦ MONSOON SMP ✦ &fWelcome &d%player%&f! &7Enjoy your adventure in Season 4. &8&m━━━━━━━━━━━━━━━━━━━━━━

  1. CONFIGURATION

Everything should be configurable from con

Kodari AI
KodariSep 24 at 12:13 pm 1
MonsoonWelcome
A Paper 1.21.11 plugin that delivers a lightweight welcome sequence for players joining a survival SMP. On join, it displays a centered title with configurable fade-in, stay, and fade-out timings, plays a configurable join sound, spawns a short purple-themed particle effect (PORTAL and END_ROD) around the player, and sends a formatted chat message with player name placeholder. All messages, sounds, particle types, durations, and title timings are configurable from config.yml, ensuring server administrators can customize the experience without code changes. The particle effect is time-limited to prevent server lag.

I’ll create the Paper 1.21.11 Gradle project, plugin entry point, and a config covering the title, sound, chat, and lightweight particle effect.

Created the MonsoonWelcome Paper plugin with configurable title timing, join sound, particle types and duration, and chat message in config.yml. The particle effect runs briefly on a low-frequency schedule.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
5 164
src/main/java/com/monsoonwelcome/MonsoonWelcomePlugin.java
package com.monsoonwelcome;

import com.cryptomorin.xseries.XSound;
import com.cryptomorin.xseries.particles.XParticle;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

public final class MonsoonWelcomePlugin extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        sendTitle(player);
        playJoinSound(player);
        sendWelcomeMessage(player);
        spawnWelcomeParticles(player);
    }

    private void sendTitle(Player player) {
        String title = color(getConfig().getString("title.text", "&5&lWELCOME TO MONSOON SMP"));
        String subtitle = color(getConfig().getString("title.subtitle", "&d&lSEASON 4 &8• &fSURVIVAL SMP"));
        int fadeIn = Math.max(0, getConfig().getInt("title.fade-in-ticks", 10));
        int stay = Math.max(0, getConfig().getInt("title.stay-ticks", 60));
        int fadeOut = Math.max(0, getConfig().getInt("title.fade-out-ticks", 20));

        player.sendTitle(title, subtitle, fadeIn, stay, fadeOut);
    }

    private void playJoinSound(Player player) {
        if (!getConfig().getBoolean("sound.enabled", true)) {
            return;
        }

        String soundName = getConfig().getString("sound.name", "ENTITY_PLAYER_LEVELUP");
        float volume = (float) getConfig().getDouble("sound.volume", 1.0);
        float pitch = (float) getConfig().getDouble("sound.pitch", 1.0);
        XSound.matchXSound(soundName).ifPresent(sound ->
                player.playSound(player.getLocation(), sound.get(), volume, pitch));
    }

    private void sendWelcomeMessage(Player player) {
        for (String line : getConfig().getStringList("chat.lines")) {
            player.sendMessage(color(line.replace("%player%", player.getName())));
        }
    }

    private void spawnWelcomeParticles(Player player) {
        if (!getConfig().getBoolean("particles.enabled", true)) {
            return;
        }

        int duration = Math.max(0, getConfig().getInt("particles.duration-ticks", 40));
        int interval = Math.max(1, getConfig().getInt("particles.interval-ticks", 5));
        int count = Math.max(0, getConfig().getInt("particles.count", 8));
        double horizontalOffset = Math.max(0.0, getConfig().getDouble("particles.horizontal-offset", 0.8));
        double verticalOffset = Math.max(0.0, getConfig().getDouble("particles.vertical-offset", 1.0));
        double extra = Math.max(0.0, getConfig().getDouble("particles.extra", 0.02));
        if (duration == 0 || count == 0) {
            return;
        }

        new BukkitRunnable() {
            private int elapsedTicks;

            @Override
            public void run() {
                if (!player.isOnline() || elapsedTicks >= duration) {
                    cancel();
                    return;
                }

                Location location = player.getLocation().add(0, 1, 0);
                for (String particleName : getConfig().getStringList("particles.types")) {
                    XParticle.of(particleName).ifPresent(particle ->
                            player.getWorld().spawnParticle(
                                    particle.get(), location, count,
                                    horizontalOffset, verticalOffset, horizontalOffset, extra));
                }
                elapsedTicks += interval;
            }
        }.runTaskTimer(this, 0L, interval);
    }

    private String color(String message) {
        return ChatColor.translateAlternateColorCodes('&', message);
    }
}