Boujour à tous,
Ses lignes de code mon en Grande partie fournie par " la kappacité" que je remercie grandement.
Mes données d'entrer provienne du site https://mineskin.org/.
Voir la pièce jointe 90584
Avec Texture Data = Value et Texture Signature = Signature.
J'ai donc créer une énumération pour plusieurs skin différent voici le code :
Cette enum me permet de récupe les skins plus facilement. cette enum est la même en 1.15.1 et en 1.9.
J'ai une autre class MakeSkin
Voici la version 1.15.1 :
Qui me provoque :
dans la boucle
du coup tout les personnes présente sur le serveur sont déconnecter.
Par contre ne Version 1.9 cela fonction parfaitement voici la méthode loadSkin en 1.9
Donc cela ne fonctionne plus en 1.15.1 et je ne comprend pas pourquoi,
Pouvez vous m'aider a mettre à jours ce code ?
ou m'indique sur quoi je doit travailler et m'expliquer pourquoi cela déconnecté tout les joueurs et a quoi cela est due ?
Cordialement,
Passepartout007
Edit : Le bug qui fais crache les joueur provienne de la ligne
comme si les informations était m'auvaise ..
Ses lignes de code mon en Grande partie fournie par " la kappacité" que je remercie grandement.
Mes données d'entrer provienne du site https://mineskin.org/.
Voir la pièce jointe 90584
Avec Texture Data = Value et Texture Signature = Signature.
J'ai donc créer une énumération pour plusieurs skin différent voici le code :
Code:
package fr.passepartout007.gestionjoueur.gestionSkin;
public enum Skins {
SACRIM("ewogICJ0aW1lc3RhbXAiIDogMTYwMTEzOTM5NjY0MCwKICAicHJvZmlsZUlkIiA6ICJkMGI4MjE1OThmMTE0NzI1ODBmNmNiZTliOGUxYmU3MCIsCiAgInByb2ZpbGVOYW1lIiA6ICJqYmFydHl5IiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzU1MjhhMzg5MzhhMzU2NTQ3Nzc2MWM4MTNmZGNmMzE0YjRiMTU4ZWEyYWQxZDNhNTRjMTdkNDliZTVjYTExZjUiCiAgICB9CiAgfQ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W1lIiA6ICJiY2QyMDMzYzYzZWM0YmY4IiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2JlNmMwNTJmZDc5OWY5ZTcyYThlNmE0NDVlMzczMWI2NzhlN2E4YzAxZDZlZGJhYTIzMTNlZWMyMDlhMzVmZjUiCiAgICB9CiAgfQp9","aw+32eS1sL9d7abgRXAka+K5pmVXe+0pVP+9i7tBIAuZnj9PDxhoFdn1tL4OEY/scKN8G6W4xnafhq7nwP47i14UrgdgXeeGTHHAi4Net4fax9fhkC6aktL97C81dmO3y2oGwiO37cZhtb9GlRnXOWROnhIQk604g4i9ZDNY2Yr1cYkZeBIcoMshamVRyxryWZ07Z11HK2qSxH94rTn/ADqiMf2kiEf/ysCglkP8GHUoozQE0TNHQUDElJRVNAEQyVyB9G7TcYCs/4wGYqUk9InENecgRwzO7F69DqtJk3moj3Tz60WUvXDwtKtVAvOSb1M1MIIUmJESORKSAw5F5xXiUeLqupWIAB0Son/4qoWz2fSMTtbHjnNVn0UuAAiGcB3EIsjn4s/2gSvzFQo8VPN2mPq4Nd1PzXAE2GUblJhrh9lNCbvdfGlgbATyokHE7vxHdFGIp8D/FRInH21Lf9prNF/WKkFOlvm7MBoEaN7a9LvUd2AiWQQEeqlDzeQ/XBeHEWH2teP4ZVjCvVEKDbH91Ny8vCd1qGLfA8jckBP7qbCEykFXT8azLqMKENyE7MfgqTheDKdjOufeW2UrHOfQC5uo6DY50dt/4Xyn4Wy5MlV/yKTw/L45VmUphXFgd9iRWmCfdQTp6ww7w8U9sAkHQkfcBKSTw1IiwYntZMs=");
private String value;
private String signature;
Skins(String Value, String Signature){
this.value = value;
this.signature = signature;
}
public String getValue() {return value;}
public String getSignature() {return signature;}
}
Cette enum me permet de récupe les skins plus facilement. cette enum est la même en 1.15.1 et en 1.9.
J'ai une autre class MakeSkin
Voici la version 1.15.1 :
Code:
package fr.passepartout007.gestionjoueur.gestionSkin;
import java.util.HashSet;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.minecraft.server.v1_15_R1.EntityPlayer;
import net.minecraft.server.v1_15_R1.PacketPlayInClientCommand;
import net.minecraft.server.v1_15_R1.PacketPlayInClientCommand.EnumClientCommand;
import net.minecraft.server.v1_15_R1.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_15_R1.PacketPlayOutHeldItemSlot;
import net.minecraft.server.v1_15_R1.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_15_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_15_R1.PacketPlayOutPosition;
import net.minecraft.server.v1_15_R1.PlayerConnection;
public class MakeSkin {
public void loadSkin(Player player) {
Location l = player.getLocation();
EntityPlayer entityPlayer= ((CraftPlayer)player).getHandle();
GameProfile profile = entityPlayer.getProfile();
profile.getProperties().put("textures",new Property("texture",Skins.SACRIM.getValue(),Skins.SACRIM.getSignature()));
PacketPlayOutPlayerInfo removePlayer = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER,entityPlayer);
PacketPlayOutPlayerInfo addPlayer = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER,entityPlayer);
PacketPlayOutEntityDestroy destroyEntity = new PacketPlayOutEntityDestroy(player.getEntityId());
PacketPlayOutNamedEntitySpawn spawnEntity = new PacketPlayOutNamedEntitySpawn(entityPlayer);
for( Player onlinePlayer : Bukkit.getOnlinePlayers()) {
if(!onlinePlayer.getUniqueId().equals(player.getUniqueId())) {
PlayerConnection playerConnection = ((CraftPlayer)onlinePlayer).getHandle().playerConnection;
playerConnection.sendPacket(removePlayer);
playerConnection.sendPacket(addPlayer);
playerConnection.sendPacket(destroyEntity);
playerConnection.sendPacket(spawnEntity);
}else {
CraftPlayer craftPlayer = (CraftPlayer) onlinePlayer;
PlayerConnection playerConnection = craftPlayer.getHandle().playerConnection;
// PacketPlayOutRespawn packetPlayOutRespawn = new PacketPlayOutRespawn(craftPlayer.getHandle().dimension,
// craftPlayer.getWorld().getEnvironment().getId(),
// entityPlayer.getWorld().worldData.getType(),
// entityPlayer.playerInteractManager.getGameMode());
System.out.println("3"); PacketPlayInClientCommand PacketPlayInClientCommand = new PacketPlayInClientCommand(EnumClientCommand.PERFORM_RESPAWN);
PacketPlayOutPosition packetPlayOutPosition = new PacketPlayOutPosition(
l.getX(), l.getY(), l.getZ(), l.getYaw(), l.getPitch(), new HashSet<PacketPlayOutPosition.EnumPlayerTeleportFlags>(), 0
);
PacketPlayOutHeldItemSlot playOutHeldItemSlot = new PacketPlayOutHeldItemSlot(player.getInventory().getHeldItemSlot());
playerConnection.sendPacket(removePlayer);
playerConnection.sendPacket(addPlayer);
playerConnection.sendPacket(PacketPlayInClientCommand);
playerConnection.sendPacket(packetPlayOutPosition);
playerConnection.sendPacket(playOutHeldItemSlot);
player.updateInventory();
System.out.println(craftPlayer);
craftPlayer.updateScaledHealth();
entityPlayer.triggerHealthUpdate();
}
}
}
}
Qui me provoque :
lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException
dans la boucle
for( Player onlinePlayer : Bukkit.getOnlinePlayers())
du coup tout les personnes présente sur le serveur sont déconnecter.
Par contre ne Version 1.9 cela fonction parfaitement voici la méthode loadSkin en 1.9
Code:
public void loadSkin(Player player) {
Location l = player.getLocation();
EntityPlayer entityPlayer= ((CraftPlayer)player).getHandle();
GameProfile profile = entityPlayer.getProfile();
profile.getProperties().put("textures",new Property("texture",Skins.SACRIM.getValue(),Skins.SACRIM.getSignature()));
PacketPlayOutPlayerInfo removePlayer = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER,entityPlayer);
PacketPlayOutPlayerInfo addPlayer = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER,entityPlayer);
PacketPlayOutEntityDestroy destroyEntity = new PacketPlayOutEntityDestroy(player.getEntityId());
PacketPlayOutNamedEntitySpawn spawnEntity = new PacketPlayOutNamedEntitySpawn(entityPlayer);
for( Player onlinePlayer : Bukkit.getOnlinePlayers()) {
if(!onlinePlayer.getUniqueId().equals(player.getUniqueId())) {
PlayerConnection playerConnection = ((CraftPlayer)onlinePlayer).getHandle().playerConnection;
playerConnection.sendPacket(removePlayer);
playerConnection.sendPacket(addPlayer);
playerConnection.sendPacket(destroyEntity);
playerConnection.sendPacket(spawnEntity);
}else {
PlayerConnection playerConnection = ((CraftPlayer) onlinePlayer).getHandle().playerConnection;
PacketPlayOutRespawn packetPlayOutRespawn = new PacketPlayOutRespawn(craftPlayer.getWorld().getEnvironment().getId(),
entityPlayer.getWorld().getDifficulty(), entityPlayer.getWorld().worldData.getType(),
entityPlayer.playerInteractManager.getGameMode());
PacketPlayOutPosition packetPlayOutPosition = new PacketPlayOutPosition(
l.getX(), l.getY(), l.getZ(), l.getYaw(), l.getPitch(), new HashSet<PacketPlayOutPosition.EnumPlayerTeleportFlags>(), 0
);
PacketPlayOutHeldItemSlot playOutHeldItemSlot = new PacketPlayOutHeldItemSlot(player.getInventory().getHeldItemSlot());
playerConnection.sendPacket(removePlayer);
playerConnection.sendPacket(addPlayer);
playerConnection.sendPacket(packetPlayOutRespawn);
playerConnection.sendPacket(packetPlayOutPosition);
playerConnection.sendPacket(playOutHeldItemSlot);
player.updateInventory();
craftPlayer.updateScaledHealth();
entityPlayer.triggerHealthUpdate();
}
}
}
Donc cela ne fonctionne plus en 1.15.1 et je ne comprend pas pourquoi,
Pouvez vous m'aider a mettre à jours ce code ?
ou m'indique sur quoi je doit travailler et m'expliquer pourquoi cela déconnecté tout les joueurs et a quoi cela est due ?
Cordialement,
Passepartout007
Edit : Le bug qui fais crache les joueur provienne de la ligne
Code:
playerConnection.sendPacket(addPlayer);
comme si les informations était m'auvaise ..
Dernière édition: