Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/disguise [entity] as player does not directly fully support arbitrary GameProfiles (player UUIDs) #3

Open
James103 opened this issue May 18, 2021 · 7 comments

Comments

@James103
Copy link

James103 commented May 18, 2021

As of commit 1274902 (tested on 660c818), the /disguise command does not support using an arbitrary GameProfile (player UUID/skin/cape/etc) for arbitrary entities with different UUIDs. Currently, the only way to get a specific player disguise for example is to spawn the entity with the UUID of the player whose skin you want and then run the /disguise [UUID of target player/entity] as player on that entity, or run a command like the following, replacing the UUID with that of whatever player you want the disguise to be:

summon minecraft:villager ~ ~1 ~ {
	CustomName: '""',
	UUID: [I;569325948,980831927,-1441289827,1069963490],
	DisguiseLib: {
		DisguiseType: "minecraft:player",
		DisguiseAlive: 1b
	}
}

/help output for disguise command for reference (notice no extra arguments to insert the target player UUID)

/disguise <entity> as minecraft:player
/disguise <entity> as player
/disguise <entity> as <disguise> [<nbt>]

This is likely caused by the following commented out lines. Do you why these lines are commented out?

.then(literal("minecraft:player")
/*.then(argument("playername", word())
.executes(DisguiseCommand::disguiseAsPlayer)
)*/
.executes(DisguiseCommand::disguiseAsPlayer)
)
.then(literal("player")
/*.then(argument("playername", word())
.executes(DisguiseCommand::disguiseAsPlayer)
)*/
.executes(DisguiseCommand::disguiseAsPlayer)

@samolego
Copy link
Owner

Those have been left out in the first release, as they weren't ready yet. It's a planned feature but I haven't had time to fully implement it yet.

@James103
Copy link
Author

Maybe as an alternative to using player names, would it be possible to also allow the use of real player UUIDs for the playername argument? That would fit in line with already existing behavior for commands that accept both names and UUIDs, where /kill <your UUID> has the same effect as /kill <your username>.

@samolego
Copy link
Owner

Maybe as an alternative to using player names, would it be possible to also allow the use of real player UUIDs for the playername argument? That would fit in line with already existing behavior for commands that accept both names and UUIDs, where /kill <your UUID> has the same effect as /kill <your username>.

I'd rather stick with playernames, as they are more "user-friendly". I believe that messing with entity UUIDs can lead to some trouble as well.

@James103
Copy link
Author

If this sort of command is implemented, would you be able to make it so multiple entities can be disguised as players corresponding to the same player name (GameProfile), or would each player-disguised entity need to have its own GameProfile?

If multiple entities can be disguised as the same GameProfile, that would simply things a lot because you don't have to find multiple players with the skin you want to be able to use that skin on multiple player disguises at once.

@samolego
Copy link
Owner

Yes, skin is saved in different property in the GameProfile.

@James103
Copy link
Author

Would the skin of the GameProfile associated with the player-disguised entity be cached somewhere as well (meaning even if the underlying player changes his/her skin, the player-disguised entity's skin does not change unless manually updated)

@samolego
Copy link
Owner

It would be cached until re-login

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants