gabehsjs

create a minecraft plugin that with special rings allows you to summon a 3d model of a tiger dragon fox or golem that has 3 abilites each and make it so it is reacable by commands and make it balanced

Kodari AI
KodariMay 25 at 3:38 pm 20,137 (v2)

I’ll create a combat plugin featuring magical rings that summon powerful creature companions with unique abilities.

SummonRings
A combat plugin featuring special rings that summon powerful 3D creature companions. Players can summon tigers, dragons, foxes, or golems, each with three unique abilities and distinct playstyles. Features balanced cooldowns, mana costs, duration limits, and command-based ring distribution. Each creature serves different roles: tiger (agile melee), dragon (ranged damage), fox (support/utility), and golem (tank/defense).

Now I’ll create the complete plugin structure with balanced abilities and command system.

Perfect! I’ve created SummonRings - a complete combat plugin featuring magical rings that summon powerful creature companions.

Features Created:

4 Unique Creatures:

  • Tiger (Agile Melee) - Pounce, Bleeding Strikes, Roar

  • Dragon (Ranged Damage) - Fireball, Wing Gust, Fire Breath

  • Fox (Support/Utility) - Swift Paws, Cunning Strike, Healing Lick

  • Golem (Tank/Defense) - Stone Armor, Ground Slam, Taunt

Balance System:

  • Cooldowns (10-30s per ability)

  • Mana costs (15-30 per ability)

  • Summon duration (5 minutes)

  • One summon per player limit

  • Different stats per creature (health, damage, speed)

Usage:

  • Right-click ring to summon

  • Drop ring to use abilities (alternates between ability 1 & 2)

  • Sneak + drop for ability 3

  • /ring give <player> <type> - Give rings

  • /ring list - View active summons

  • /ring unsummon <player> - Remove summon

All abilities have visual/sound effects, proper damage calculations, and balanced gameplay!

gabehsjs

rg.bukkit.command.CommandException: Unhandled exception executing command 'ring' in plugin SummonRings v1.0.0

at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?]

at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:83) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.3.10.jar:?]

at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:30) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:104) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:469) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.commands.Commands.performCommand(Commands.java:374) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.commands.Commands.performCommand(Commands.java:362) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2375) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$12(ServerGamePacketListenerImpl.java:2348) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:177) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1525) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:188) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:151) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1505) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1499) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.MinecraftServer.recordTaskExecutionTimeWhileWaiting(MinecraftServer.java:1225) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1341) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:388) ~[paper-1.21.11.jar:1.21.11-132-c5eb079]

at java.base/java.lang.Thread.run(Unknown Source) ~[?:?]

Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.file.FileConfiguration.getString(String, String)" because "this.config" is null

at SummonRings-1.0.0.jar//com.summonrings.SummonRings.getPrefix(SummonRings.java:55) ~[?:?]

at SummonRings-1.0.0.jar//com.summonrings.commands.RingCommand.handleGive(RingCommand.java:55) ~[?:?]

at SummonRings-1.0.0.jar//com.summonrings.commands.RingCommand.onCommand(RingCommand.java:40) ~[?:?]

at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.21.11-R0.1-SNAPSHOT.jar:?]

... 24 more it came with this areor and does not give me rings

Kodari AI
KodariMay 25 at 3:49 pm 17,993 (v2)

I need to check the main plugin class to fix the configuration loading issue.

I see the issue - the config field is being set in onEnable() but there might

Now I need to update the config.yml to use the correct placeholder format:

Perfect! I’ve fixed the configuration loading issue. Here’s what was wrong and what I fixed:

Issues Fixed:

  1. NullPointerException on config access - The plugin was storing a config field that could be null. I changed it to use JavaPlugin’s built-in getConfig() method directly, which is always available.

  2. Message system updated - Changed the message replacement system to use {prefix} placeholder instead of trying to replace empty strings.

  3. Added missing config messages - Added all the command-related messages to config.yml:

    • no-player-found

    • invalid-creature

    • usage-give

    • usage-unsummon

    • unsummoned-other

    • no-summon-active

  4. Consistent message usage - Updated RingCommand to use config messages everywhere.

How to Use:

Commands:

  • /ring give <player> <type> - Give a summon ring (tiger, dragon, fox, or golem)

  • /ring list - View all active summons

  • /ring unsummon <player> - Remove a player’s summon

  • /ring reload - Reload configuration

Using Rings:

  • Right-click to summon

  • Drop ring to cycle abilities (1 & 2)

  • Sneak + drop for ability 3

The plugin should now work perfectly! Reload/restart your server and the /ring give command will work.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
24 1,581
src/main/java/com/summonrings/SummonRings.java
package com.summonrings;

import com.summonrings.commands.RingCommand;
import com.summonrings.listeners.CombatListener;
import com.summonrings.listeners.RingUseListener;
import com.summonrings.managers.RingManager;
import com.summonrings.managers.SummonManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SummonRings extends JavaPlugin {
    
    private SummonManager summonManager;
    private RingManager ringManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.ringManager = new RingManager(this);
        this.summonManager = new SummonManager(this);
        
        getCommand("ring").setExecutor(new RingCommand(this));
        
        Bukkit.getPluginManager().registerEvents(new RingUseListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            summonManager.tickAllSummons();
        }, 20L, 20L);
        
        getLogger().info("SummonRings has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (summonManager != null) {
            summonManager.removeAllSummons();
        }
        getLogger().info("SummonRings has been disabled!");
    }
    
    public String getMessage(String key) {
        return getConfig().getString("messages." + key, "&cMessage not found: " + key)
                .replace("&", "§")
                .replace("{prefix}", getPrefix());
    }
    
    public String getPrefix() {
        return getConfig().getString("messages.prefix", "&8[&5SummonRings&8]&r ").replace("&", "§");
    }
}