BotCoder01

Paper plugin for Minecraft 1.21.11 — Nether Card Portal System This plugin adds two custom items and replaces how nether portals are lit entirely.

Item 1: Primary Nether Card Shaped 3x3 crafting recipe, exact layout:

Top row: Lapis Lazuli, Amethyst Shard, Redstone Middle row: Emerald, Diamond, Gold Ingot Bottom row: Copper Ingot, Iron Ingot, Coal Produces 1x "Primary Nether Card" — a custom item (use Prismarine Shard as the base item for now since there's no resource pack) with a distinct display name, lore describing it as a component for a Nether Card, and a persistent data tag identifying it as primary_nether_card so it can't be faked by renaming a regular item.

Item 2: Nether Card Shaped 3x3 crafting recipe: all 8 outer slots filled with Primary Nether Card, center slot filled with a Sculk Catalyst.

Produces 1x "Nether Card" — another custom item (use Nether Star as the base item), with its own display name, lore, and a persistent data tag nether_card.

Warden drop addition: Wardens don't normally drop items — add a custom death drop so killing a Warden always drops exactly 1 Sculk Catalyst.

Portal lighting restriction: Block every vanilla way of lighting a nether portal — flint and steel, fire charge, lava, dispensers, anything — on any obsidian portal frame. Cancel PortalCreateEvent when the reason is FIRE so nothing but this plugin can activate a portal.

Lighting with the Nether Card: When a player right-clicks a valid obsidian portal frame while holding a Nether Card, manually fill the frame with nether portal blocks and consume 1 Nether Card from their hand. Track this portal (and the linked portal that vanilla generates on the other side when a player travels through) as a "card portal" pair.

One-way-return lifecycle: When a player travels from the Overworld into the Nether through a card portal, mark that portal pair as "in use." When any player then travels back from the Nether side of that pair to the Overworld side, immediately: replace all nether portal blocks in both linked portals with air (leave the obsidian frames intact), so the frames go dark and need a brand new Nether Card to relight. This means each Nether Card only ever allows one round trip before the portal deactivates and the card is gone — to go again ,players must craft 8 new Primary Nether Cards to make a new Nether Card to make another trip.

Kodari AI
KodariJul 28 at 12:12 pm 7
NetherCardPortals
A Paper 1.21.11 plugin that introduces a Nether Card portal system. It adds Primary Nether Cards and Nether Cards with exact custom crafting recipes, persistent item tags, and descriptive lore. Wardens always drop one Sculk Catalyst. Vanilla Nether portal ignition is blocked, while players can activate valid obsidian frames with Nether Cards. Generated portal pairs are tracked, persisted, and automatically deactivated after one complete Overworld-to-Nether-to-Overworld trip.
BotCoder01

Will it work even if i crossplay with minecraft bedrock through geyser

Kodari AI
KodariJul 28 at 12:16 pm 2

Geyser crossplay should work because the plugin uses standard Paper/Bukkit events and does not depend on Java-only client mods or custom packets.

Bedrock players connected through Geyser should be able to:

  • Craft both cards through the Bedrock crafting interface.

  • Hold and right-click an obsidian frame with a Nether Card.

  • Travel through the generated Nether portal.

  • Trigger the one-round return/deactivation behavior.

  • Receive the Warden’s Sculk Catalyst drop.

The custom items use normal Minecraft items as their bases, with Java-side persistent data tags. Geyser passes those items between the Bedrock client and the Java server, so renaming a normal Prismarine Shard or Nether Star will not make a fake card.

There are two current issues unrelated to Geyser that should be fixed before release:

  1. The Primary Nether Card recipe reuses C for both Copper and Coal, so the coal ingredient overwrites the copper ingredient:

    Java
    primaryRecipe.setIngredient('C', material("COPPER_INGOT"));
    primaryRecipe.setIngredient('C', material("COAL"));
    

    Those need separate recipe characters.

  2. Bedrock players may see the base item names/icons, since there is no resource pack. The custom display names and lore should still be transmitted, but the items will visually appear as Prismarine Shards and Nether Stars.

No Geyser or Floodgate dependency is required unless you later want Bedrock-specific behavior, such as detecting Bedrock players or showing Bedrock-only instructions.

BotCoder01

When you generated the plugin did you add textures?

Kodari AI
KodariJul 28 at 12:17 pm 1

No. The plugin currently does not include custom textures or a resource pack.

It uses:

  • Prismarine Shard as the base item for the Primary Nether Card

  • Nether Star as the base item for the Nether Card

The custom names, lore, and persistent data tags are included, but the items will retain their vanilla appearances. Custom textures would require adding a resource pack, typically using CustomModelData or the newer item model system.

BotCoder01

When I. Import it and type /plugins in console it shows this plugin as red colour which I think means it's not working

Kodari AI
KodariJul 28 at 2:53 pm 4

The plugin is red because its startup code calls plugin().getServer() before a plugin reference is initialized, causing an enable-time error. I’m fixing that startup failure and correcting the copper/coal recipe character collision.

The plugin had a startup error that caused it to appear red. The recipe registration code tried to use an uninitialized plugin reference, which caused an enable-time NullPointerException.

I fixed that issue and also corrected the Primary Nether Card recipe so the bottom row is properly:

  • Copper Ingot

  • Iron Ingot

  • Coal

Rebuild the plugin JAR, replace the old JAR in your server’s plugins folder, and fully restart the server. Do not use /reload.

If it still appears red, check the console immediately after startup and send the error beginning with:

Plain Text
[Server thread/ERROR]

The exact startup error will identify whether there is another issue, such as a missing dependency in the JAR.

BotCoder01

Okay does it have any dependency plugins??

Kodari AI
KodariJul 28 at 2:54 pm 1

No dependency plugins are required.

The plugin only requires:

  • Paper 1.21.11

  • Java 21

It does not require:

  • Geyser

  • Floodgate

  • Vault

  • WorldEdit

  • Any other server plugin

It uses XSeries as an internal Java library for compatibility, but that is not a plugin you install separately. It needs to be bundled into the generated plugin JAR. If the plugin still appears red after rebuilding, send the startup error from the console—especially any ClassNotFoundException or NoClassDefFoundError mentioning XSeries.

BotCoder01

Can it run on java 25

Kodari AI
KodariJul 28 at 2:55 pm 1

Yes, it should run on Java 25.

The plugin is built for Java 21, and Java 25 can run Java 21-compatible plugins. This plugin uses standard Paper APIs and does not rely on Java-21-only runtime behavior.

Requirements:

  • Paper 1.21.11

  • Java 25

  • Build the plugin with Java 21-compatible settings

  • Use a recent Paper build that supports Java 25

You do not need to install Java 21 separately unless your specific Paper build reports that Java 25 is unsupported. If the server starts normally and /version shows Java 25, the plugin should load normally.

BotCoder01

It works 100% perfectly just one thing that when player goes inside a nether portal and when comes back from it the portal should auto matically break please add this

Kodari AI
KodariJul 30 at 2:21 pm 2

Plan:

  1. Inspect the portal travel tracking and linked-portal state.

  2. Update the return-travel handler to clear both portal interiors while preserving obsidian frames.

  3. Verify the change against the existing portal lifecycle.

This behavior is already implemented in the current plugin.

When a player:

  1. Travels from the Overworld through a Nether Card portal, the portal pair is marked as in use.

  2. Returns from the Nether through the linked portal, the plugin:

    • Removes all Nether Portal blocks from both sides.

    • Leaves the obsidian frames intact.

    • Deletes the saved portal pair.

    • Requires a new Nether Card to activate the frame again.

The relevant logic is in PortalManager.handleTravel() and deactivate(). No additional dependency or configuration is needed.

BotCoder01

Not worked

Kodari AI
KodariJul 30 at 2:30 pm 5

The return logic was too dependent on the portal-generation event being matched perfectly. I’m making travel tracking use the actual Nether-portal teleport event, check both travel endpoints, and delay removal by one tick so both portal blocks are cleared after the return teleport completes.

The failure is in the travel hook: the plugin only checked PlayerPortalEvent and only the source location, so the return event could be missed or occur before the generated portal state was ready. I’m changing it to track every Nether-portal teleport, check both endpoints, and remove both interiors on the next server tick.

Fixed the portal return handling.

Changes made:

  • Switched from PlayerPortalEvent to PlayerTeleportEvent with the NETHER_PORTAL cause.

  • Checks both the origin and destination locations to find the tracked portal pair.

  • Delays portal removal by one server tick so the return teleport can finish properly.

  • Removes portal blocks on both sides while leaving the obsidian frames intact.

Rebuild the plugin JAR, replace the old JAR, and fully restart the server. Do not use /reload.

Test sequence:

  1. Activate the Overworld frame with a Nether Card.

  2. Enter the portal.

  3. Wait until you arrive in the Nether.

  4. Enter the generated Nether-side portal.

  5. After returning, both portal interiors should be air and both obsidian frames should remain.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 848
src/main/java/com/kodari/nethercardportals/NetherCardPortalsPlugin.java
package com.kodari.nethercardportals;

import com.kodari.nethercardportals.item.CustomItems;
import com.kodari.nethercardportals.portal.PortalListener;
import com.kodari.nethercardportals.portal.PortalManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class NetherCardPortalsPlugin extends JavaPlugin {
    private CustomItems customItems;
    private PortalManager portalManager;

    @Override
    public void onEnable() {
        this.customItems = new CustomItems(this);
        this.customItems.registerRecipes();

        this.portalManager = new PortalManager(this);

        Bukkit.getPluginManager().registerEvents(
                new PortalListener(this, customItems, portalManager),
                this
        );
    }

    @Override
    public void onDisable() {
        if (portalManager != null) {
            portalManager.save();
        }
    }
}