Walter Rosi

can you make a plugin for fabric 26.3 that creates a command that makes the user completely invisible. The command won't grant the invisibility potion effect, but will make the user COMPLETELY invisible without effects around him. The command will be: /invisibility (player's name) .

To undo this effect there will be another command: /invisibility (player's name) remove

Kodari AI
KodariFri at 1:38 pm 3
TrueInvisibility
Fabric mod for Minecraft 26.3 that provides a command to render players completely invisible without using the potion effect. The /invisibility command accepts a player name to hide them entirely from other players' view, and /invisibility (name) remove reverses the effect. Uses custom rendering logic to strip the entity from client-side rendering while keeping server-side presence intact, ensuring no visual traces or particles remain.
  • Add an operator command to hide or reveal a player.

  • Remove hidden players from client entity tracking, including their equipment, and restore tracking when revealed.

Created the Fabric mod with two operator commands:

  • /invisibility <player> hides the player and their equipment from other players.

  • /invisibility <player> remove makes them visible again.

No potion effect is applied. Invisibility ends when the player disconnects; it does not hide their name from the player list or prevent sounds and other world interactions.

Walter Rosi

can you make it a paper plugn?

Kodari AI
KodariFri at 2:16 pm 1

This project is a Fabric 26.3 mod. Kodari supports Paper plugins; switch the project type to build it as one.

Switch to Paper plugin

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
10 204
src/main/java/com/kodari/invisibility/InvisibilityMod.java
package com.kodari.invisibility;

import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import net.minecraft.commands.Commands;
import net.minecraft.commands.arguments.EntityArgument;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerPlayer;

public class InvisibilityMod implements ModInitializer {
    private static final Set<UUID> HIDDEN = new HashSet<>();

    public static boolean isHidden(ServerPlayer player) {
        return HIDDEN.contains(player.getUUID());
    }

    private static void setHidden(ServerPlayer player, boolean hidden) {
        if (hidden) {
            HIDDEN.add(player.getUUID());
        } else {
            HIDDEN.remove(player.getUUID());
        }
        ((TrackingRefresh) player.level().getChunkSource().chunkMap).completeInvisibility$refresh(player);
    }

    @Override
    public void onInitialize() {
        CommandRegistrationCallback.EVENT.register((dispatcher, buildContext, selection) ->
            dispatcher.register(Commands.literal("invisibility")
                .requires(source -> Commands.LEVEL_MODERATORS.check(source.permissions()))
                .then(Commands.argument("player", EntityArgument.player())
                    .executes(context -> {
                        ServerPlayer player = EntityArgument.getPlayer(context, "player");
                        setHidden(player, true);
                        context.getSource().sendSuccess(() -> Component.literal(player.getName().getString() + " is now invisible."), false);
                        return 1;
                    })
                    .then(Commands.literal("remove").executes(context -> {
                        ServerPlayer player = EntityArgument.getPlayer(context, "player");
                        setHidden(player, false);
                        context.getSource().sendSuccess(() -> Component.literal(player.getName().getString() + " is visible again."), false);
                        return 1;
                    }))))
        );
        ServerPlayConnectionEvents.DISCONNECT.register((listener, server) -> HIDDEN.remove(listener.getPlayer().getUUID()));
    }
}