For version 2.7-SNAPSHOT.
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_10_R1</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_10_R1;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -105,4 +108,19 @@ public class NPC_v1_10_R1 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_11_R1</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_11_R1;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -105,4 +108,19 @@ public class NPC_v1_11_R1 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_12_R1</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_12_R1;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -105,4 +108,19 @@ public class NPC_v1_12_R1 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_13_R1</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_13_R1;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -105,4 +108,19 @@ public class NPC_v1_13_R1 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_13_R2</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_13_R2;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -105,4 +108,19 @@ public class NPC_v1_13_R2 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_14_R1</artifactId>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package net.jitse.npclib.nms.v1_14_R1;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -101,4 +104,19 @@ public class NPC_v1_14_R1 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_15_R1</artifactId>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package net.jitse.npclib.nms.v1_15_R1;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -102,4 +105,19 @@ public class NPC_v1_15_R1 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_8_R2</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_8_R2;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -110,4 +113,19 @@ public class NPC_v1_8_R2 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, slot.getSlot(), CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_8_R3</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_8_R3;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -111,4 +114,19 @@ public class NPC_v1_8_R3 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, slot.getSlot(), CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_9_R1</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_9_R1;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -105,4 +108,19 @@ public class NPC_v1_9_R1 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.6-SNAPSHOT</version>
|
||||
<version>2.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_9_R2</artifactId>
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
package net.jitse.npclib.nms.v1_9_R2;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import net.jitse.npclib.NPCLib;
|
||||
import net.jitse.npclib.api.skin.Skin;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
@@ -105,4 +108,19 @@ public class NPC_v1_9_R2 extends NPCBase {
|
||||
PacketPlayOutEntityEquipment packet = new PacketPlayOutEntityEquipment(entityId, nmsSlot, CraftItemStack.asNMSCopy(item));
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
newProfile.getProperties().get("textures").clear();
|
||||
newProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||
this.packetPlayOutPlayerInfoAdd = new PacketPlayOutPlayerInfoWrapper().create(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, newProfile, name);
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoRemove);
|
||||
playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
||||
playerConnection.sendPacket(packetPlayOutPlayerInfoAdd);
|
||||
playerConnection.sendPacket(packetPlayOutNamedEntitySpawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user