bananiaka

a plugin that blocks the update of diamond armour to netherite armour for minecraft 26.1.2

Kodari AI
KodariJun 27 at 5:47 pm 3
NetheriteUpgradeBlocker
A lightweight plugin that prevents players from upgrading diamond armor to netherite armor at the smithing table. Blocks both the crafting result preview and the final item event so upgrades are fully denied. Supports a permission node to allow specific players or staff to bypass the restriction. Configurable deny message included.

Plan:

  • NetheriteUpgradeBlocker.java — main plugin class, registers listener

  • SmithingListener.java — cancels PrepareSmithingEvent and SmithItemEvent when the result is netherite armor

  • plugin.yml, config.yml


How it works:

Event
What it does
PrepareSmithingEvent
Clears the result slot preview so the upgrade visually cannot be done
SmithItemEvent
Cancels the actual item take as a safety net and sends the deny message

Permission: netheriteupgradeblocker.bypass (default: op) — grants to players/groups who should still be able to upgrade.

Config (config.yml): Change deny-message to any &-formatted message you like.

⚠️ Note: Minecraft 26.1.2 doesn’t exist as a version — the latest is 1.21.x. This plugin is built against the modern smithing table API which covers 1.20+. If you meant a specific version, let me know and I’ll adjust!

Kodari can make mistakes. Review important code before using.
Files
src
Code
4 102
src/main/java/com/kodari/netheriteupgradeblocker/NetheriteUpgradeBlocker.java
package com.kodari.netheriteupgradeblocker;

import org.bukkit.plugin.java.JavaPlugin;

public class NetheriteUpgradeBlocker extends JavaPlugin {

    private static NetheriteUpgradeBlocker instance;

    @Override
    public void onEnable() {
        instance = this;
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(new SmithingListener(this), this);
    }

    public static NetheriteUpgradeBlocker getInstance() {
        return instance;
    }

    public String getDenyMessage() {
        return getConfig().getString("deny-message", "&cYou cannot upgrade diamond armor to netherite armor!");
    }
}