.

make a 1.8.8 spigot plugin . a cobweb ability item when i right click on it it spawns a 3x3 cobweb area where the player who im looking at standing , and i msg that triggers when you use it with the player who i used the ability on placeholder and edit-able in the config

Kodari AI
KodariMar 9 at 1:40 pm 8,984 (v2)

I’ll create a 1.8.8 Spigot plugin with a cobweb ability that targets players you’re looking at.

CobwebAbility
A targeted ability plugin that spawns a 3x3 cobweb trap around players you look at and right-click on. Features configurable ability items with custom names and lore, adjustable targeting distance, and customizable messages with player name placeholders. Supports 1.8.8+ with cross-version compatibility.
CobwebAbility
A targeted ability plugin that spawns a 3x3 cobweb trap around players you look at and right-click on. Features configurable ability items with custom names and lore, adjustable targeting distance, and customizable messages with player name placeholders. Supports 1.8.8+ with cross-version compatibility.

All files created! The plugin spawns a 3x3 cobweb area at the target player’s location when you right-click with the ability item while looking at them. Messages and item properties are fully configurable in config.yml with {player} placeholder support.

.

make it working on java 8 , and add a command to give the item

Kodari AI
KodariMar 9 at 1:43 pm 7,705 (v2)

I’ll read the existing files to understand the current implementation, then make it Java 8 compatible and add a command.

I’ll make the plugin Java 8 compatible and add a command to give the ability item.

.

the plugin isnt registering in my server (spigot java 8 1.8.8)

Kodari AI
KodariMar 9 at 1:47 pm 1,954 (v2)

I’ll check the existing plugin files to diagnose why it’s not registering.

Found the issue! The plugin.yml has api-version: 1.13 which doesn’t exist in Spigot 1.8.8 (it was added in 1.13+). This will prevent the plugin from loading.

Fix:

Removed the api-version field since it’s not supported in 1.8.8 and causes the plugin to fail registration.

.

the config.yml isnt creating by itself + it still didnt register

Kodari AI
KodariMar 9 at 1:50 pm 4,288 (v2)

I found the issues! The manifest.kod includes xseries which auto-causes conflicts (XSeries is auto-detected), and the plugin.yml is missing api-version. Also fixing a deprecated method call.

Fixed: Removed xseries from manifest.kod (auto-detected), added api-version to plugin.yml, and updated deprecated getItemInHand() method.

.

make the web 3x1x3 and make it edit-able from the config

Kodari AI
KodariMar 9 at 2:14 pm 9,503 (v2)

I’ll read the existing files to understand the current implementation and make the web size configurable.

I’ll make the cobweb area size configurable and set it to 3x1x3 by default.

Updated the cobweb area to be configurable with width, height, and depth settings in the config.yml (defaulting to 3x1x3 as requested).

.

how do i get the item

Kodari AI
KodariMar 9 at 2:19 pm 11,944 (v2)

I need to read the existing files to understand what item you’re referring to and how the plugin currently works.

I can see the plugin uses a special cobweb trap item, but there’s currently no command to get it. Let me add a command so you can give yourself or others the ability item.

Now I’ll create a command to give the ability item:

Now I need to register the command in the main class and add it to plugin.yml:

Command registered. Use /cobwebtrap or /cobwebtrap <player> to get the ability item.

.

make the item unplaceable when i right click it

Kodari AI
KodariMar 9 at 2:22 pm 6,718 (v2)

I’ll modify the listener to prevent the cobweb item from being placed as a block.

The item is now completely unplaceable when right-clicking. The listener now cancels all interactions with the ability item and prevents it from being placed as a block.

.

when i right click it doesnt do anything , make it trap the closest player im looking at

Kodari AI
KodariMar 9 at 2:38 pm 7,290 (v2)

I’ll read the existing files to understand the current implementation and fix the right-click functionality.

Looking at the code, I can see the issue. The event is being cancelled too early, and the raycasting for finding the target player needs improvement. Let me fix this:

.

make it target the last player u hit within 20 secs

Kodari AI
KodariMar 9 at 2:42 pm 5,881 (v2)

I’ll modify the plugin to track the last player you hit within 20 seconds and target them with the ability.

Plan:

  • Create LastHitData class to store target UUID and timestamp

  • Track player hits in AbilityListener using EntityDamageByEntityEvent

  • Replace line-of-sight targeting with last-hit targeting (20 second window)

Modified CobwebAbility to track the last player you hit within 20 seconds and target them with the ability instead of using line-of-sight targeting.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
10 462
src/main/java/com/cobwebability/CobwebAbility.java
package com.cobwebability;

import com.cobwebability.listener.AbilityListener;
import com.cobwebability.manager.ConfigManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CobwebAbility extends JavaPlugin {
    
    private ConfigManager configManager;
    
    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        configManager.loadConfig();
        
        getServer().getPluginManager().registerEvents(new AbilityListener(this), this);
        
        getCommand("cobwebtrap").setExecutor(new com.cobwebability.command.GiveItemCommand(this));
        
        getLogger().info("CobwebAbility has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("CobwebAbility has been disabled!");
    }
}