So in Hypixel, I’ve noticed that they are able to modify specific NPCs to use your user’s skin. I presume they are displaying this NPC with my skin, but it’s only visible to me. Is there a way to replicate this in Sponge?
GreifPrevention seems to do something similar when displaying claim borders. Only the user checking for these claim borders can see an outline of the border with blocks that are “placed” around the perimeter without actually placing the blocks in the world. Does anyone know how this is done? Thanks!
The second part can be accomplished by sending virtual block changes to a single player – there are a couple player-based methods to set a coordinate to a blockstate, and to reset that coordinate. The changes appear as real map updates sent to that particular client, until they try to interact/break them, move far enough away and return, or logout/login.
Per-player entity stuff is still an outstanding dream for sponge api, but its on the drawing board.
Possible only using packets iirc.
First part was done using nms (minecraft server root code “network minecraft server”). Sponge will hopfully expose this part of the nms in this recorded pull request
As for grief prevention sending client blocks. This is done using the following code
player.sendBlockChange(Vector3i blockpos, BlockState theBlock);