Player's inventory + NPC?

and @TheBoomer can i change the skin of a player? for a mini-game like murder?

i know this is possible and it’s a human the player must have the proprieties, …
on your code, you put the skin after spawning the zombie!!!

there is my code:

	public void setSkin(Player player, String name){
		String uuid = null;
		switch(name){
		case "Marc":
			uuid = "0733f2bd-6f17-4802-a85a-9b7d4459b239";
		default:
			uuid = "b857313a-ea45-41bb-bcc7-067fc261606d";
		}
		p.offer(Keys.SKIN_UNIQUE_ID, UUID.fromString(uuid));
	}

do you have any idea wy it doesn’t work? i’m on sponge 4.1.0 - 1271
on online mode!

You can’t change the skin of a Player, only a Human.

but player is a human, …

and there is a lot of server who do it!!!

Its done differently than through this mechanism…

As a rule of thumb, anytime something doesn’t work right that involves offering data to something, capture and display/log the offer resultType when you do it, such as :
logDebug(p.offer(Keys.SKIN_UNIQUE_ID, UUID.fromString(uuid)).getType());

Best to capture a DataTransactionResult dtr=p.offer(Keys.SKIN_UNIQUE_ID, UUID.fromString(uuid)) to test the result as well when you need to

That way if the offer fails, its pertaining to the offer not being acceptable in the first place, or fault with the data offered; if its a success, then you look elsewhere. I believe this would return a FAILURE result when applied to a player, not a human object

yes i know, but why there is some server who done that successfully?

i have to do that but how can i?

Not according to the code.

public interface Humanoid { }
public interface Player extends Humanoid {}
public interface Human extends Humanoid {}

Players are Humanoids. Humans (artificial entities that look like players) are Humanoids. Players are not Humans.

oki, but why some serveur can do it?

They probably aren’t using Sponge.

They are using Spigot and Bungee but they use a packet hack

I done this using bungeecord! On my bungeecord i set the player’s skin using a Bungee ChangeSkin plugin. This way, the player can join on your Sponge server, use the commands to change the skin, relog and see the changes. A trick with bungee… nothing with your server.