Paper: Player profile API broken on 1.15

Created on 24 Dec 2019  路  5Comments  路  Source: PaperMC/Paper

What behaviour is expected:

My skin to change

What behaviour is observed:

My skin is default steve

Steps/models to reproduce:

Run this code

    Player player = // you know what to do here
    PlayerProfile profile = player.getPlayerProfile();
    profile.setProperty(new ProfileProperty("textures", /* replace with skin texture */ , /* skin texture signature */));
    player.setPlayerProfile(profile);

You see the skin doesn't change.

Plugin list:

AnnouncementsEverywhere, Skins

Paper build number:

Anything else:

The Skins plugin is being a dev build (nowhere available except my pc cuz I don't wanna commit before everything is finished so I can keep the git history clean). Before you say it's something with my skin fetcher, you're wrong, as the build was before tested on spigot and worked properly, and before tested on paper nothing about it was touched.

Most helpful comment

And that is why you don't open an issue about unrelated implementation on unrelated project. You are simply wasting others' time

All 5 comments

How can you test this on spigot when this is a paper API?

When exactly are you running this code? Like which event. If you run it after being spawend in, you need to respawn the player.

How can you test this on spigot when this is a paper API?

The java terminology of that is "abstraction". I have another end which is being used for spigot and craftbukkit. It directly touches the NMS, doesn't support dynamic skin change but on reconnect it changes the skin.

When exactly are you running this code? Like which event. If you run it after being spawend in, you need to respawn the player.

It is PlayerJoinEvent, but that really doesn't matter in that case as the code is also being ran in a command and again: applies nothing to the player skin.

EDIT: If you don't know the skins plugin is open source and its source code is available at my github here. (before you start blaming me for license just stfu I'm too lazy to change it to MIT again)

Any improvements to this are being accepted (everything other I've improved in my dev build).

image

The java terminology of that is "abstraction". aka, completely irrelevant, as the code you're flashing off here is literally irrelevant to your implementation elsewhere

Ok. So it looks like this is a problem with something other and not the player profile api. It looks like when I was testing the dev build on spigot, i was using outdated version of spigot, now I used latest version, and it sets my skin on steve. At current version the plugin is using .join() on the futures, which makes everything sync, now in the dev build where it doesn't use .join() it uses .whenComplete() and for some reason this breaks the skin set. Perhaps in that .whenComplete() I should throw the bukkit scheduler in order for the skin to actually set on the player.

Closing.

And that is why you don't open an issue about unrelated implementation on unrelated project. You are simply wasting others' time

Was this page helpful?
0 / 5 - 0 ratings