Bot
šŸ“Ž 1 file 2,577 chars
šŸ“„
pasted-code-1788967518802.txt
txt 134 lines
ā–¶
DEFAULT WELCOME

NexWelcoms MUST include a complete, polished default welcome configuration.

The plugin must work immediately after installation without requiring the server owner to edit any configuration.

The owner can edit the messages, colors, timing, sounds, rewards, and layout later through the configuration files.

Default Stage 1

Display in chat to the new player and all online players:



                    ESRAMC

              WELCOME YOU WITH ā¤



Use:

- Bold ESRAMC
- Blue → aqua gradient
- Black shadow
- White text
- Red heart
- Clean spacing

Default ESRAMC:

ESRAMC

Default welcome line:

WELCOME YOU WITH ā¤

Duration: 3 seconds

---

Default Stage 2

After Stage 1 disappears, display:



       NEW MEMORIES APPEAR AFTER THIS MESSAGE

            YOUR ADVENTURE STARTS FROM HERE

             WE HOPE YOU ENJOY EVERY MOMENT ā¤



All text must be bold.

Default colors:

NEW MEMORIES APPEAR AFTER THIS MESSAGE
→ Aqua

YOUR ADVENTURE STARTS FROM HERE
→ White

WE HOPE YOU ENJOY EVERY MOMENT ā¤
→ Gray + Red heart

Duration: 5 seconds

After Stage 2, clear the welcome screen.

---

DEFAULT CONFIGURATION

The generated "config.yml" must already contain these defaults:

welcome:
  enabled: true
  first-join-only: true

  display-to:
    new-player: true
    online-players: true

  screen:
    mode: "chat"

  stage-1:
    enabled: true
    duration-seconds: 3
    lines:
      - ""
      - "ESRAMC"
      - "WELCOME YOU WITH ā¤"
      - ""

  stage-2:
    enabled: true
    duration-seconds: 5
    lines:
      - ""
      - "NEW MEMORIES APPEAR AFTER THIS MESSAGE"
      - "YOUR ADVENTURE STARTS FROM HERE"
      - "WE HOPE YOU ENJOY EVERY MOMENT ā¤"
      - ""

  animation:
    clear-between-stages: true
    clear-after-finish: true
    spacing-lines: 12

IMPORTANT

The server owner should be able to edit this later without recompiling the plugin.

For example, they should be able to change:

- "ESRAMC" text
- Welcome text
- Stage 1 duration
- Stage 2 duration
- Gradient colors
- Heart color
- Fonts/styles
- Blank-line spacing
- Sounds
- Display mode
- First-join behavior

After editing, "/nexwelcoms reload" must apply the changes immediately.

The default configuration must always remain valid and functional on a fresh installation.
Kodari AI
KodariSep 9 at 3:28 pm 1
NexWelcoms
A Minecraft plugin that displays a multi-stage animated welcome sequence to new players upon their first join. Stage 1 shows a bold gradient server name with a shadow effect and a red heart, lasting 3 seconds. Stage 2 follows with three bold lines in aqua, white, and gray colors, lasting 5 seconds. The sequence can be displayed in chat or as a full-screen overlay, configurable via a YAML file that supports custom text, colors, gradients, durations, sounds, and spacing. Includes a reload command to apply configuration changes without recompiling.

Created the NexWelcoms project from scratch with:

  • Complete default config.yml matching the ESRAMC welcome sequence

  • Configurable stages, durations, colors, spacing, sounds, rewards, display modes, and first-join behavior

  • /nexwelcoms reload command with tab completion

  • Chat and action-bar display support

  • MiniMessage formatting

  • Welcome sound and console reward support

  • Automatic task cleanup on reload and shutdown

  • Gradle build setup targeting Paper 1.21.4 and Java 21

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 492
src/main/java/com/esramc/nexwelcoms/NexWelcoms.java
package com.esramc.nexwelcoms;

import com.esramc.nexwelcoms.command.NexWelcomsCommand;
import com.esramc.nexwelcoms.listener.WelcomeListener;
import com.esramc.nexwelcoms.welcome.WelcomeManager;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class NexWelcoms extends JavaPlugin {
    private WelcomeManager welcomeManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.welcomeManager = new WelcomeManager(this);
        Bukkit.getPluginManager().registerEvents(new WelcomeListener(this), this);

        NexWelcomsCommand command = new NexWelcomsCommand(this);
        PluginCommand pluginCommand = getCommand("nexwelcoms");
        if (pluginCommand != null) {
            pluginCommand.setExecutor(command);
            pluginCommand.setTabCompleter(command);
        }
    }

    @Override
    public void onDisable() {
        if (welcomeManager != null) {
            welcomeManager.cancelAll();
        }
    }

    public WelcomeManager getWelcomeManager() {
        return welcomeManager;
    }

    public void reloadPluginConfiguration() {
        reloadConfig();
        welcomeManager.reload();
    }
}