nacho_ninja1

Create a premium Minecraft Paper 1.21.11 plugin called:

WAFFLE SPAWN Version: 1.0.0 Author: XChippooX

IMPORTANT:

Make this a professional standalone spawn plugin for WAFFLE SMP.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🏠 MAIN COMMAND ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

/spawn

When a player uses /spawn, teleport them to the server spawn.

Also add:

/setspawn /delspawn

Permissions:

wafflespawn.admin wafflespawn.setspawn wafflespawn.reload

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⏱️ TELEPORT COUNTDOWN ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

DO NOT teleport the player instantly.

Default countdown:

5 seconds

Display the countdown ON SCREEN using a title/actionbar.

Example:

&6&lWAFFLE SMP &eTeleporting in &f5&e...

Then:

&eTeleporting in &f4&e... &eTeleporting in &f3&e... &eTeleporting in &f2&e... &eTeleporting in &f1&e...

Then:

&6&lTELEPORTED! &eWelcome to spawn!

Do NOT put the countdown in chat.

Make the countdown configurable.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ❌ CANCEL TELEPORT ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

If the player moves during the countdown:

Cancel the teleport.

Display:

&c&lTELEPORT CANCELLED &7You moved!

Play a configurable cancellation sound.

Make movement sensitivity configurable.

Allow admins to configure whether:

  • Any movement cancels
  • Only block movement cancels
  • Looking around does NOT cancel

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚔️ COMBAT CHECK ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

If the player is in combat, do NOT allow /spawn.

Display:

&c&l✖ CANNOT TELEPORT &7You are currently in combat!

Make compatibility with a combat-log plugin optional.

Do not require another plugin.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🚫 DAMAGE CHECK ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

If the player takes damage during the countdown:

Cancel the teleport.

Message:

&c&lTELEPORT CANCELLED &7You took damage!

Make this configurable.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🌍 SPAWN LOCATION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

/setspawn

Sets the spawn location to the admin's exact:

  • World
  • X
  • Y
  • Z
  • Yaw
  • Pitch

Save it permanently.

It must survive server restarts.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📍 SPAWN GUI ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Add:

/spawnmenu

Open a premium WAFFLE SMP GUI.

The GUI should have:

🏠 Spawn ⚙ Spawn Settings 📍 Current Spawn ❌ Close

Only admins can access the settings.

Players can optionally use:

/spawnmenu

to open a simple player GUI with a Spawn button.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚙️ IN-GAME ADMIN SETTINGS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

I DO NOT want to edit config.yml to manage the spawn system.

Create:

/spawnadmin

This opens a complete in-game admin GUI.

Allow admins to change:

  • Countdown duration
  • Whether movement cancels
  • Whether damage cancels
  • Teleport sound
  • Countdown sound
  • Cancel sound
  • Teleport title
  • Teleport subtitle
  • Countdown text
  • Cancel message
  • Spawn message
  • Whether /spawn is enabled
  • Whether the spawn GUI is enabled

ALL of these settings must be editable in-game.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔊 SOUNDS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Allow admins to choose sounds through an in-game GUI.

Settings:

Sound Volume Pitch

Have sensible defaults.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ EFFECTS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

After teleporting, optionally play:

  • Particles
  • Sound
  • Title
  • Actionbar

All configurable in-game.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📱 ACTIONBAR ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Show countdown information in the actionbar as well.

Example:

&6&lSPAWN &8» &eTeleporting in &f3s

Make this optional.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔐 PERMISSIONS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Player permission:

wafflespawn.use

Admin:

wafflespawn.admin

Set spawn:

wafflespawn.setspawn

Reload:

wafflespawn.reload

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🛡️ SAFETY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Prevent teleport exploits.

Do not allow:

  • Multiple spawn teleports at once
  • Duplicate countdown tasks
  • Teleporting after cancellation
  • Taking items from GUIs
  • GUI item movement
  • Shift-click exploits
  • Dragging items into GUIs

If the player disconnects during a countdown, safely cancel it.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💾 DATA ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Save spawn location and all in-game settings permanently.

The admin should NOT need to edit config.yml.

Use a safe YAML/JSON data file internally.

Changes must survive server restarts.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🔄 RELOAD ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

/spawnadmin reload

Safely reload the plugin.

Do not create duplicate schedulers.

Do not lose settings.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📢 DEFAULT STYLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use the WAFFLE SMP theme:

Gold Brown Cream White Dark gray

Example:

&8[&6&lWAFFLE&8] &7» &eTeleporting to spawn...

Make the design clean and premium.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📦 MAVEN REQUIREMENT ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use MAVEN, NOT javac.

The complete project must contain:

pom.xml src/main/java/ src/main/resources/plugin.yml README.md

Paper 1.21.11 compatible.

Final JAR:

WaffleSpawn-1.0.0.jar

Build with:

mvn clean package

Final output:

target/WaffleSpawn-1.0.0.jar

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🚨 IMPORTANT ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Give me the COMPLETE source project.

No pseudocode.

No TODOs.

No missing classes.

No incomplete features.

The plugin must actually compile and work on Paper 1.21.11.

Keep the entire system standalone.

Make WAFFLE SPAWN feel like a professional premium Minecraft SMP plugin.

Kodari AI
KodariOct 2 at 5:12 pm 2
WaffleSpawn
A premium standalone spawn management plugin for Paper 1.21.11 featuring configurable teleport countdown with on-screen titles and actionbars, movement and damage cancellation detection, combat checks, persistent spawn location storage, and a comprehensive in-game admin GUI system. Includes /spawn, /setspawn, /delspawn, /spawnmenu, and /spawnadmin commands with full permission support, customizable sounds, particles, effects, and safety measures against teleport exploits. All settings editable in-game without config.yml editing, with automatic data persistence across restarts.
  1. Build the Maven/Paper project structure and plugin metadata.

  2. Implement persistent spawn/settings, commands, countdown, combat/damage/movement cancellation, and safe task cleanup.

  3. Add player/admin GUIs for all requested settings, sound controls, and text editing.

  4. Add setup, permissions, and usage documentation.

Created the complete WAFFLE SPAWN Maven project with persistent spawn data, countdown and cancellation handling, combat protection, permissions, and player/admin GUIs for in-game settings.

Build it with mvn clean package; the configured output is target/WaffleSpawn-1.0.0.jar.

nacho_ninja1

Where can I download gng

Kodari AI
KodariOct 2 at 5:26 pm 1

If you mean the plugin: the source project is in the project files. Run mvn clean package; the JAR will be at target/WaffleSpawn-1.0.0.jar. I haven’t generated a downloadable JAR here.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
README.md
Code
8 1,222
src/main/java/com/wafflesmp/wafflespawn/WaffleSpawnPlugin.java
package com.wafflesmp.wafflespawn;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.io.IOException;
import java.util.Collections;
import java.util.List;

public class WaffleSpawnPlugin extends JavaPlugin implements CommandExecutor, TabCompleter {
    private File dataFile;
    private YamlConfiguration data;
    private SpawnSettings settings;
    private Location spawnLocation;
    private SpawnTeleportManager teleportManager;
    private SpawnGui spawnGui;

    @Override
    public void onEnable() {
        dataFile = new File(getDataFolder(), "data.yml");
        loadData();
        teleportManager = new SpawnTeleportManager(this);
        spawnGui = new SpawnGui(this);
        getServer().getPluginManager().registerEvents(teleportManager, this);
        getServer().getPluginManager().registerEvents(spawnGui, this);
        for (String command : List.of("spawn", "setspawn", "delspawn", "spawnmenu", "spawnadmin")) {
            getCommand(command).setExecutor(this);
            getCommand(command).setTabCompleter(this);
        }
        saveData();
        getLogger().info("Waffle Spawn 1.0.0 enabled.");
    }

    @Override
    public void onDisable() {
        if (teleportManager != null) {
            teleportManager.stopAll();
        }
        if (settings != null) {
            saveData();
        }
    }

    private void loadData() {
        if (!getDataFolder().exists()) {
            getDataFolder().mkdirs();
        }
        data = YamlConfiguration.loadConfiguration(dataFile);
        ConfigurationSection section = data.getConfigurationSection("settings");
        settings = new SpawnSettings();
        if (section != null) {
            settings.setCountdownSeconds(Math.max(1, Math.min(60, section.getInt("countdown-seconds", 5))));
            settings.setMovementMode(SpawnSettings.MovementMode.from(section.getString("movement-mode", "ANY")));
            settings.setMovementSensitivity(Math.max(0.01, Math.min(1.0, section.getDouble("movement-sensitivity", 0.05))));
            settings.setCancelOnDamage(section.getBoolean("cancel-on-damage", true));
            settings.setSpawnEnabled(section.getBoolean("spawn-enabled", true));
            settings.setSpawnGuiEnabled(section.getBoolean("spawn-gui-enabled", true));
            settings.setActionbarCountdown(section.getBoolean("actionbar-countdown", true));
            settings.setTeleportTitle(section.getString("teleport-title", "&6&lTELEPORTED!"));
            settings.setTeleportSubtitle(section.getString("teleport-subtitle", "&eWelcome to spawn!"));
            settings.setCountdownText(section.getString("countdown-text", "&eTeleporting in &f{seconds}&e..."));
            settings.setCancelMessage(section.getString("cancel-message", "&7You moved!"));
            settings.setSpawnMessage(section.getString("spawn-message", "&8[&6&lWAFFLE&8] &7» &eWelcome to spawn!"));
            settings.setEffectsParticles(section.getBoolean("effects.particles", true));
            settings.setEffectsTitle(section.getBoolean("effects.title", true));
            settings.setEffectsActionbar(section.getBoolean("effects.actionbar", false));
            loadSound(section.getConfigurationSection("sounds.teleport"), settings.getTeleportSound());
            loadSound(section.getConfigurationSection("sounds.countdown"), settings.getCountdownSound());
            loadSound(section.getConfigurationSection("sounds.cancel"), settings.getCancelSound());
        }
        ConfigurationSection savedSpawn = data.getConfigurationSection("spawn");
        if (savedSpawn != null) {
            World world = Bukkit.getWorld(savedSpawn.getString("world", ""));
            if (world != null) {
                spawnLocation = new Location(world,
                        savedSpawn.getDouble("x"), savedSpawn.getDouble("y"), savedSpawn.getDouble("z"),
                        (float) savedSpawn.getDouble("yaw"), (float) savedSpawn.getDouble("pitch"));
            } else {
                spawnLocation = null;
                getLogger().warning("The saved spawn world is not loaded: " + savedSpawn.getString("world"));
            }
        } else {
            spawnLocation = null;
        }
    }

    private void loadSound(ConfigurationSection section, SoundSetting setting) {
        if (section == null) {
            return;
        }
        setting.setSound(section.getString("sound", setting.getSound()));
        setting.setVolume((float) Math.max(0.0, Math.min(2.0, section.getDouble("volume", setting.getVolume()))));
        setting.setPitch((float) Math.max(0.5, Math.min(2.0, section.getDouble("pitch", setting.getPitch()))));
    }

    public void saveData() {
        if (data == null || settings == null) {
            return;
        }
        data.set("settings.countdown-seconds", settings.getCountdownSeconds());
        data.set("settings.movement-mode", settings.getMovementMode().name());
        data.set("settings.movement-sensitivity", settings.getMovementSensitivity());
        data.set("settings.cancel-on-damage", settings.isCancelOnDamage());
        data.set("settings.spawn-enabled", settings.isSpawnEnabled());
        data.set("settings.spawn-gui-enabled", settings.isSpawnGuiEnabled());
        data.set("settings.actionbar-countdown", settings.isActionbarCountdown());
        data.set("settings.teleport-title", settings.getTeleportTitle());
        data.set("settings.teleport-subtitle", settings.getTeleportSubtitle());
        data.set("settings.countdown-text", settings.getCountdownText());
        data.set("settings.cancel-message", settings.getCancelMessage());
        data.set("settings.spawn-message", settings.getSpawnMessage());
        data.set("settings.effects.particles", settings.isEffectsParticles());
        data.set("settings.effects.title", settings.isEffectsTitle());
        data.set("settings.effects.actionbar", settings.isEffectsActionbar());
        saveSound("settings.sounds.teleport", settings.getTeleportSound());
        saveSound("settings.sounds.countdown", settings.getCountdownSound());
        saveSound("settings.sounds.cancel", settings.getCancelSound());
        if (spawnLocation != null) {
            data.set("spawn.world", spawnLocation.getWorld().getName());
            data.set("spawn.x", spawnLocation.getX());
            data.set("spawn.y", spawnLocation.getY());
            data.set("spawn.z", spawnLocation.getZ());
            data.set("spawn.yaw", spawnLocation.getYaw());
            data.set("spawn.pitch", spawnLocation.getPitch());
        }
        try {
            data.save(dataFile);
        } catch (IOException exception) {
            getLogger().severe("Could not save data.yml: " + exception.getMessage());
        }
    }

    private void saveSound(String path, SoundSetting setting) {
        data.set(path + ".sound", setting.getSound());
        data.set(path + ".volume", setting.getVolume());
        data.set(path + ".pitch", setting.getPitch());
    }

    public void reloadData() {
        if (teleportManager != null) {
            teleportManager.stopAll();
        }
        loadData();
    }

    public void setSpawn(Location location) {
        spawnLocation = location.clone();
        saveData();
    }

    public void deleteSpawn() {
        spawnLocation = null;
        data.set("spawn", null);
        saveData();
    }

    public Location getSpawnLocation() {
        return spawnLocation == null ? null : spawnLocation.clone();
    }

    public SpawnSettings getSettings() {
        return settings;
    }

    public SpawnTeleportManager getTeleportManager() {
        return teleportManager;
    }

    public SpawnGui getSpawnGui() {
        return spawnGui;
    }

    public String color(String text) {
        return ChatColor.translateAlternateColorCodes('&', text == null ? "" : text);
    }

    public void sendPluginMessage(CommandSender sender, String message) {
        sender.sendMessage(color("&8[&6&lWAFFLE&8] &7» &e" + message));
    }

    private boolean isAdmin(CommandSender sender) {
        return sender.hasPermission("wafflespawn.admin");
    }

    private boolean canSetSpawn(CommandSender sender) {
        return isAdmin(sender) || sender.hasPermission("wafflespawn.setspawn");
    }

    @Override