跳到正文

UUID Impersonate

Allows you to impersonate another player at the UUID level which allows you to load in as though you are really that player (NBT and all).

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

The motivation behind this mod was to:

  • Modify Player (NBT) Data of Inactive Players
  1. Dump Inventories (and Ender Chests)
  2. Interact with mods as though you are the player so you don’t need to resort to NBT manipulation if the mod does not have admin functionality/management

The way the mod functions is by

  • Letting the server check if the actual player joining (not the person they are impersonating) is allowed to join the server
  • So the original player cannot use this to bypass bans or other things that would inhibit joining ordinarily
  • It also has the helpful side effect of making it so (on a whitelisted server) you don’t need to whitelist the player you are impersonating.
  • Then after it verifies you can join, it checks if you are trying to impersonate someone (via the /uuidimpersonate impersonate <player|uuid> command you used on the previous login)
  • The /uuidimpersonate impersonate <player|uuid> command is guarded by both a not impersonated predicate and a has OP level 4 (owner) predicate.
  • The accompanying /uuidimpersonate clear command is guarded by just an impersonated predicate (so no matter what permissions you have, you can stop the impersonation)
  • If for some reason the /uuidimpersonate clear command is not working, the impersonation list is not persistent so you can also restart the server to clear ALL impersonations.
  • If you are then it swaps out the original GameProfile with the player you are trying to impersonate’s (generated) GameProfile.

It is that simple, however, as there is a hardcoded 16 character limit for the GameProfile’s name, I had to inject into various places like the ServerPlayerEntity#getPlayerListName (for tab list) and the PlayerEntity#getName (for chat messages and others) functions to get the name I wanted to display (“ImpersonatedName (Impersonated by OriginalName)”) while impersonating which ensures transparency for other players.

This is still not perfect though, for instance, I observed that some mods (like Fabricord) check the GameProfile name directly (instead of PlayerEntity#getName) and thus it will only appear as though the (Impersonated) player joined the world without the descriptor of who is impersonating them (looks like a normal non-impersonated join)

常见问题

UUID Impersonate 支持哪些 Minecraft 版本?

UUID Impersonate 支持 Minecraft Java 版 1.20.1–1.21,共 2 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

UUID Impersonate 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分

JordanPlayz158 的其他作品

查看全部 →