umutkavim alp

make a smiley yellow smiley face named verity its a ball its an mob entity

Kodari AI
KodariSep 6 at 5:33 pm 1
VeritySmiley
VeritySmiley is a Minecraft plugin that spawns a custom mob entity named "Verity" — a smiling yellow ball with a cheerful face. The plugin registers a unique entity type using a custom entity class, spawning it at a configurable location on server start or via command. The entity has a bright yellow spherical appearance, a permanent smiley face texture, and basic AI to wander and bob playfully. Commands allow players to summon Verity, remove it, or toggle its ambient particle effects. The plugin includes configuration for spawn location, health, and movement speed, ensuring a lightweight, fun addition to any server.
  1. Create a Paper plugin project with Java 21 and a /verity command.

  2. Spawn Verity as a persistent, invulnerable, no-AI slime ball with a yellow smiley name.

Created the Verity Paper plugin.

  • /verity spawns an invulnerable, persistent, no-AI slime ball.

  • Verity is named ☺ Verity in yellow.

  • Only players with verity.spawn can use the command; default is operators.

  • Includes Gradle setup, plugin.yml, and Java 21 configuration.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
4 91
src/main/java/com/verity/VerityPlugin.java
package com.verity;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.entity.Slime;
import org.bukkit.plugin.java.JavaPlugin;

public final class VerityPlugin extends JavaPlugin implements CommandExecutor {

    @Override
    public void onEnable() {
        getCommand("verity").setExecutor(this);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage("Only players can spawn Verity.");
            return true;
        }

        Location spawnLocation = player.getLocation().add(0, 0.1, 0);
        Slime verity = player.getWorld().spawn(spawnLocation, Slime.class);
        verity.setSize(2);
        verity.setAI(false);
        verity.setAware(false);
        verity.setInvulnerable(true);
        verity.setCollidable(false);
        verity.setRemoveWhenFarAway(false);
        verity.setPersistent(true);
        verity.setCustomName(ChatColor.YELLOW + "☺ Verity");
        verity.setCustomNameVisible(true);

        player.sendMessage(ChatColor.YELLOW + "☺ Verity has arrived!");
        return true;
    }
}