Giter VIP home page Giter VIP logo

Comments (5)

md-5 avatar md-5 commented on September 28, 2024

I don't believe ProtocolLib provides the necessary APIs for this.

@dmulloy2

from itag.

joerndyherrn avatar joerndyherrn commented on September 28, 2024

The problem is that in 1.8 the PacketPlayOutNamedEntity has changed. The field b is no gameprofile anywhere is a gameprofile. You have to change the field b (UUID) and something else ...

from itag.

joerndyherrn avatar joerndyherrn commented on September 28, 2024

@md-5

from itag.

dmulloy2 avatar dmulloy2 commented on September 28, 2024

Unfortunately, due to the change to UUIDs, plugins like iTag and TagAPI can't use the methods they used to to modify tags. There isn't anything I can do with ProtocolLib to fix this, since Mojang changed the packet. There is a way to achieve a similar effect with scoreboards and teams though, but I don't know exactly how.

from itag.

codebucketdev avatar codebucketdev commented on September 28, 2024

There is a solution how to change the name and skin of a player (http://www.postcrafter.de/viewtopic.php?f=15&t=2387), but is based on hardcoded NMS which I didn't prefer. Also I want to modify the needed packets while sending it to the player. To realise it I want to use ProtocolLib, but I didn't know how to make a use of it..

@md-5 @dmulloy2

//Edit: After I debugged a lot with ProtocolLib, I've got these results:
[10:02:44] [User Authenticator #4/INFO]: UUID of player Cloudcode is 879b67d8-b360-455b-ad8e-87e7494bf515
[10:02:44] [Server thread/INFO]: [ProtocolLib] Sent PacketPlayOutPlayerInfo[56, legacy: 201] to Cloudcode:
{ a = { name = "ADD_PLAYER", ordinal = 0 }, b = ({ b = 0, c = "SURVIVAL", d = com.mojang.authlib.GameProfile@3c88b215[id=879b67d8-b360-455b-ad8e-87e7494bf515,name=Cloudcode,properties={textures=[com.mojang.authlib.properties.Property@70d8256e]},legacy=false], e = NULL, a = "net.minecraft.server.v1_8_R1.PacketPlayOutPlayerInfo@3aebcc40" }) }
[10:02:44] [Server thread/INFO]: [ProtocolLib] Sent PacketPlayOutPlayerInfo[56, legacy: 201] to Cloudcode:
{ a = { name = "ADD_PLAYER", ordinal = 0 }, b = ({ b = 0, c = "SURVIVAL", d = com.mojang.authlib.GameProfile@3c88b215[id=879b67d8-b360-455b-ad8e-87e7494bf515,name=Cloudcode,properties={textures=[com.mojang.authlib.properties.Property@70d8256e]},legacy=false], e = NULL, a = "net.minecraft.server.v1_8_R1.PacketPlayOutPlayerInfo@32639fbf" }) }
[10:02:44] [Server thread/INFO]: Cloudcode[/37.120.114.72:50225] logged in with entity id 19107 at ([world] -344.1588017139189, 76.0, 680.8334687873283)
[10:02:45] [Server thread/INFO]: [ProtocolLib] Sent PacketPlayOutPlayerInfo[56, legacy: 201] to Cloudcode:
{ a = { name = "UPDATE_DISPLAY_NAME", ordinal = 3 }, b = ({ b = 0, c = "SURVIVAL", d = com.mojang.authlib.GameProfile@3c88b215[id=879b67d8-b360-455b-ad8e-87e7494bf515,name=Cloudcode,properties={textures=[com.mojang.authlib.properties.Property@70d8256e]},legacy=false], e = NULL, a = "net.minecraft.server.v1_8_R1.PacketPlayOutPlayerInfo@677b2a56" }) }
[10:03:10] [Server thread/INFO]: [ProtocolLib] Sent PacketPlayOutPlayerInfo[56, legacy: 201] to Cloudcode:
{ a = { name = "UPDATE_LATENCY", ordinal = 2 }, b = ({ b = 139, c = "SURVIVAL", d = com.mojang.authlib.GameProfile@3c88b215[id=879b67d8-b360-455b-ad8e-87e7494bf515,name=Cloudcode,properties={textures=[com.mojang.authlib.properties.Property@70d8256e]},legacy=false], e = NULL, a = "net.minecraft.server.v1_8_R1.PacketPlayOutPlayerInfo@61530970" }) }
[10:03:41] [Server thread/INFO]: [ProtocolLib] Sent PacketPlayOutPlayerInfo[56, legacy: 201] to Cloudcode:
{ a = { name = "UPDATE_LATENCY", ordinal = 2 }, b = ({ b = 137, c = "SURVIVAL", d = com.mojang.authlib.GameProfile@3c88b215[id=879b67d8-b360-455b-ad8e-87e7494bf515,name=Cloudcode,properties={textures=[com.mojang.authlib.properties.Property@70d8256e]},legacy=false], e = NULL, a = "net.minecraft.server.v1_8_R1.PacketPlayOutPlayerInfo@16009d73" }) }
[10:03:41] [Server thread/INFO]: Cloudcode lost connection: Disconnected
[10:03:41] [Server thread/INFO]: Cloudcode left the game.

It's seems to work if I change the GameProfile at Field d :)

from itag.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.