Barry Verison

A npc that looks like Peter Griffin that kills monsters and does 5 hearts of damage. When Peter Griffin sees the player he will follow the player forever and help the player kill monsters. Peter Griffin has 600 health and when is killed explodes in a nuclear explosion. Peter plays laughing noises and emits light.

Kodari AI
KodariSep 8 at 8:56 am 1
PeterGriffinCompanion
A Minecraft plugin that spawns a custom Peter Griffin NPC with 600 health. The NPC emits light, plays laughing sounds, and follows the player forever to assist in combat. It deals 5 hearts of damage to monsters. When killed, Peter triggers a massive nuclear explosion. The plugin handles NPC spawning, AI targeting, combat mechanics, sound effects, and explosion events.
  • Create the Gradle project and Paper plugin manifest.

  • Add the plugin entry point and /peter command.

  • Add Peter’s spawning, tracking, combat, laughter, glow, and nuclear death behavior.

  • Add configuration for health, damage, follow distance, sounds, and explosion power.

Created the Peter Griffin Minecraft plugin with:

  • /peter spawn and /peter remove commands

  • 600 health and 10 damage

  • Persistent player following and monster targeting

  • Peter-themed armor and player head

  • Fire resistance and glowing/light particle effects

  • Periodic celebratory laughing sounds

  • Nuclear explosion on death

  • Configurable health, damage, distances, sound, particles, and explosion power

Barry Verison

how come I cant spawn this when i put it in my mods folder and launch minecraft

Kodari AI
KodariSep 8 at 9:36 am 1

This is a Paper/Spigot server plugin, not a Fabric or Forge mod. Putting its .jar in Minecraft’s mods folder will not load it.

Use it this way:

  1. Download/run a Paper server matching your Minecraft version.

  2. Put the Peter Griffin .jar in the server’s plugins folder—not the client mods folder.

  3. Start the server and check the console for the plugin loading successfully.

  4. Join the server and run:

Plain Text
/peter spawn

You may need to be an operator or have the plugin permission.

If you want Peter Griffin to work in single-player or through the mods folder, it needs to be rewritten as a Fabric or Forge mod instead of a Paper plugin.

Barry Verison

what is a paper server

Kodari AI
KodariSep 8 at 9:49 am 1

A Paper server is a modified Minecraft Java Edition server that supports Bukkit/Spigot plugins. It lets you add features—such as the Peter Griffin NPC—without installing those features as client-side mods.

How it works

  • Paper server: Runs the Minecraft world and plugins.

  • plugins folder: Where Paper plugin .jar files go.

  • Minecraft client: Connects to the server normally; it does not use the plugin in its mods folder.

  • mods folder: Used by Fabric, Forge, or NeoForge mods—not Paper plugins.

Basic setup

  1. Download Paper for your Minecraft version from papermc.io/downloads/paper.

  2. Create a new folder for the server.

  3. Put the downloaded Paper .jar in that folder.

  4. Start it with Java, for example:

Shell
java -Xms2G -Xmx4G -jar paper.jar --nogui
  1. Accept the EULA by changing this in eula.txt:

Plain Text
eula=true
  1. Start the server again.

  2. Put the Peter Griffin plugin .jar into the server’s plugins folder.

  3. Join the server and run:

Plain Text
/peter spawn

Paper is primarily for multiplayer servers, although you can run one locally on your own computer for single-player use. If you specifically want Peter to work from your Minecraft mods folder, the plugin must be converted into a Fabric, Forge, or NeoForge mod.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
6 391
src/main/java/com/kodari/petergriffin/PeterPlugin.java
package com.kodari.petergriffin;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class PeterPlugin extends JavaPlugin implements Listener, CommandExecutor {

    private PeterManager peterManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        peterManager = new PeterManager(this);
        peterManager.loadExistingPeters();

        getServer().getPluginManager().registerEvents(this, this);
        if (getCommand("peter") != null) {
            getCommand("peter").setExecutor(this);
        }

        getServer().getScheduler().runTaskTimer(this, peterManager::tick, 1L, 5L);
    }

    @Override
    public void onDisable() {
        if (peterManager != null) {
            peterManager.clearTrackedPeters();
        }
    }

    @EventHandler
    public void onPeterDamage(EntityDamageByEntityEvent event) {
        if (peterManager.isPeter(event.getDamager())) {
            event.setDamage(getConfig().getDouble("damage", 10.0));
        }
    }

    @EventHandler
    public void onPeterDeath(EntityDeathEvent event) {
        if (peterManager.isPeter(event.getEntity())) {
            peterManager.handleDeath(event);
        }
    }

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

        if (args.length == 0 || args[0].equalsIgnoreCase("spawn")) {
            peterManager.removePetersOwnedBy(player);
            peterManager.spawnPeter(player);
            player.sendMessage("§6Peter Griffin §ahas joined you. He will follow you forever.");
            return true;
        }

        if (args[0].equalsIgnoreCase("remove")) {
            if (peterManager.removePetersOwnedBy(player)) {
                player.sendMessage("§ePeter Griffin has been removed.");
            } else {
                player.sendMessage("§cYou do not have a Peter Griffin companion.");
            }
            return true;
        }

        player.sendMessage("§cUsage: /peter <spawn|remove>");
        return true;
    }
}