Skip to content

Instantly share code, notes, and snippets.

View vearen1's full-sized avatar
🍪
epic

vearen vearen1

🍪
epic
View GitHub Profile
@HSGamer
HSGamer / PerInstanceInstanceViewHook.java
Last active April 30, 2023 11:34
Minestom - Per-Instance Tablist
import net.minestom.server.MinecraftServer;
import net.minestom.server.entity.Player;
import net.minestom.server.entity.PlayerSkin;
import net.minestom.server.event.Event;
import net.minestom.server.event.EventNode;
import net.minestom.server.event.instance.RemoveEntityFromInstanceEvent;
import net.minestom.server.event.player.PlayerSpawnEvent;
import net.minestom.server.instance.Instance;
import net.minestom.server.network.packet.server.play.PlayerInfoPacket;
import net.minestom.server.tag.Tag;
package net.minestom.server.instance;
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.IntIntImmutablePair;
import net.minestom.server.MinecraftServer;
import net.minestom.server.instance.block.Block;
import net.minestom.server.instance.block.BlockHandler;
import net.minestom.server.instance.palette.Palette;
import net.minestom.server.utils.NamespaceID;
@Minikloon
Minikloon / Instructions.md
Created July 7, 2024 11:03
Minecraft Player Nametags with Custom RGB.

Preview

-Naive solution:
  1. Create a team, set its prefix or suffix to the component you want.
  2. In the PlayerInfoUpdatePacket, set the Username to ""
  3. Add "" to the team.

The player entity on the client stores the username from the player list entry with a matching UUID.