ZenitCoder

A plugin That allows Minecraft 1.21.11 Spear in 1.21.4 Server without bugs

Kodari AI
KodariMar 27 at 4:10 pm 12,276 (v2)

I’ll create a plugin that ensures Minecraft tridents (spears) work properly in 1.21.4 servers with full backward compatibility.

SpearCompatibility
A compatibility plugin that ensures Minecraft tridents (spears) function correctly across versions 1.21.1 to 1.21.4. Handles throwing mechanics, enchantments (Loyalty, Riptide, Channeling, Impaling), return behavior, and damage calculations. Fixes version-specific bugs and ensures smooth cross-version spear functionality with configurable features and debug logging for troubleshooting.

Plugin created! This ensures Minecraft tridents (spears) work correctly in 1.21.4 servers with full backward compatibility.

Features:

  • Fixes loyalty enchantment return bugs

  • Fixes riptide boost mechanics

  • Fixes channeling lightning strikes

  • Handles impaling damage correctly

  • Prevents tridents from disappearing

  • Prevents duplicate trident glitches

  • Protects tridents from void loss

  • Fixes entity collision issues

  • Fully configurable enchantment behavior

  • Debug logging for troubleshooting

  • /spearcompat reload and /spearcompat info commands

All cross-version compatibility handled via XSeries. The plugin tracks thrown tridents, applies proper enchantment effects, and ensures they return/behave correctly regardless of version differences.

ZenitCoder

how to get spear in this

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 800
src/main/java/com/spearcompat/SpearCompatPlugin.java
package com.spearcompat;

import com.spearcompat.listener.SpearListener;
import com.spearcompat.manager.ConfigManager;
import com.spearcompat.manager.SpearManager;
import com.spearcompat.command.SpearCommand;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SpearCompatPlugin extends JavaPlugin {

    private ConfigManager configManager;
    private SpearManager spearManager;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.spearManager = new SpearManager(this);

        getServer().getPluginManager().registerEvents(new SpearListener(this), this);
        
        getCommand("spearcompat").setExecutor(new SpearCommand(this));

        getLogger().info("SpearCompatibility enabled - Tridents will work correctly!");
    }

    @Override
    public void onDisable() {
        if (spearManager != null) {
            spearManager.cleanup();
        }
        getLogger().info("SpearCompatibility disabled");
    }

    public void reload() {
        configManager.reload();
        spearManager.reload();
    }
}