# Name Tag - v1.0.8 ## Random Nick Improvements, Console Placeholders & Fake Rank TAB Support ### API UPDATES - **Fake rank methods** — New API methods for full developer control over TAB rank display: - `randomNick(Player, String groupName)` — Random nick with a specific fake rank. - `setNickFromPlayer(Player, String playerName, String groupName)` — Nick as another player with a specific fake rank. - `setNickname(Player, String name, String groupName)` — Set a display name with a specific fake rank. - `setFakeRank(Player, String groupName)` — Apply a fake rank without changing the nickname. - `clearFakeRank(Player)` — Remove the fake rank and restore LuckPerms-driven TAB display. - **`NickPlayer.getFakeRankId()` / `setFakeRankId()`** — Exposes the active fake rank on the player's nick data object. ### PLUGIN UPDATES - **`/randomnick` multi-player support** — `/randomnick` now accepts player selectors such as `@a`, `@r`, and `@e[...]`, allowing operators to randomize nicknames for multiple players at once. - **`/randomnick --skip` flag** — When `--skip` is provided, players who already have a nickname are skipped. Works with entity selectors (`/randomnick @a --skip`). - **Console name placeholders** — Console (and opped players) can now use `<rn:name>` and `<nn:name>` placeholders anywhere in a command to resolve a player's real or nicked name at runtime. - `<rn:name>` — Resolves to the player's real username (accepts either real name or nickname as input). - `<nn:name>` — Resolves to the player's current nickname (accepts either real name or nickname as input). - **Fake rank TAB support** — When a player is nicked, their TAB nametag and tab list entry can now display a fake rank prefix/suffix from LuckPerms. Actual permissions are never modified. - Marks eligible ranks by adding the permission `lodestone.nametag.randomly_assignable = true` to a LuckPerms group. - `/randomnick` automatically picks a random eligible rank when LuckPerms is present. - `/nick <player> as <name> -r <group>` and `/nick <player> with_name <name> -r <group>` accept a `-r` flag to force a specific rank. - On unnick, TAB immediately reverts to the player's real LuckPerms rank. - Fake ranks persist across server restarts. - Soft-dependency on LuckPerms added. Feature silently disabled if LuckPerms is not installed. - **Fake rank PlaceholderAPI placeholders** — Two new placeholders exposed via PlaceholderAPI: - `%nametag_has_fake_rank%` — `true` if the player has an active fake rank, otherwise `false`. - `%nametag_fake_rank%` — The active fake rank group name, or empty if none. ### PLUGIN FIXES - **Fixed random nick skin not applying correctly** — `/randomnick` would sometimes leave a player with the wrong skin due to two competing skin fetches finishing out of order. The nick name and skin are now applied in a single operation. - **Fixed "Chat disabled due to missing profile public key" after repeated `/randomnick`** — Changing a player's UUID invalidated their stored chat session, causing chat to break until reconnect. The session is now cleared automatically after each UUID change. - **Fixed nickname appearing as real name in whisper message bodies** — When a nicked player's name appeared in the body of a whisper command (e.g. `/w MindOfNeo KatelynYT`), it was incorrectly resolved to the real name. Resolution is now limited to the target argument only for `/w`, `/whisper`, `/tell`, `/msg`, and `/message`. `/reply` and `/r` are left untouched entirely. ### INTERNAL UPDATES - Bumped version to `1.0.8`.