Increased version number
This commit is contained in:
parent
919cfa5e5e
commit
a984f6ddec
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<artifactId>npclib</artifactId>
|
||||
<groupId>net.jitse</groupId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-api</artifactId>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_10_R1</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -109,6 +110,14 @@ public class NPC_v1_10_R1 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_11_R1</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -109,6 +110,14 @@ public class NPC_v1_11_R1 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_12_R1</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -109,6 +110,14 @@ public class NPC_v1_12_R1 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_13_R1</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -109,6 +110,14 @@ public class NPC_v1_13_R1 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_13_R2</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -109,6 +110,14 @@ public class NPC_v1_13_R2 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_14_R1</artifactId>
|
||||
|
|
|
@ -4,6 +4,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -105,6 +106,14 @@ public class NPC_v1_14_R1 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_15_R1</artifactId>
|
||||
|
|
|
@ -4,6 +4,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -106,6 +107,14 @@ public class NPC_v1_15_R1 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_16_R1</artifactId>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_8_R2</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -114,6 +115,18 @@ public class NPC_v1_8_R2 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
if(animation == NPCAnimation.SWING_OFFHAND) {
|
||||
throw new IllegalArgumentException("Offhand Swing Animations are only available on 1.9 and up.");
|
||||
}
|
||||
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -7,15 +7,12 @@ import net.minecraft.server.v1_8_R2.PacketPlayOutAnimation;
|
|||
public class PacketPlayOutAnimationWrapper {
|
||||
|
||||
public PacketPlayOutAnimation create(NPCAnimation npcAnimation, int entityId) {
|
||||
int id = npcAnimation.getId();
|
||||
if(id == 3) throw new IllegalArgumentException("Offhand Swing Animations are only available on 1.9 and up.");
|
||||
|
||||
PacketPlayOutAnimation packetPlayOutAnimation = new PacketPlayOutAnimation();
|
||||
|
||||
Reflection.getField(packetPlayOutAnimation.getClass(), "a", int.class)
|
||||
.set(packetPlayOutAnimation, entityId);
|
||||
Reflection.getField(packetPlayOutAnimation.getClass(), "b", int.class)
|
||||
.set(packetPlayOutAnimation, id);
|
||||
.set(packetPlayOutAnimation, npcAnimation.getId());
|
||||
|
||||
return packetPlayOutAnimation;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_8_R3</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -115,6 +116,18 @@ public class NPC_v1_8_R3 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
if(animation == NPCAnimation.SWING_OFFHAND) {
|
||||
throw new IllegalArgumentException("Offhand Swing Animations are only available on 1.9 and up.");
|
||||
}
|
||||
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -7,15 +7,12 @@ import net.minecraft.server.v1_8_R3.PacketPlayOutAnimation;
|
|||
public class PacketPlayOutAnimationWrapper {
|
||||
|
||||
public PacketPlayOutAnimation create(NPCAnimation npcAnimation, int entityId) {
|
||||
int id = npcAnimation.getId();
|
||||
if(id == 3) throw new IllegalArgumentException("Offhand Swing Animations are only available on 1.9 and up.");
|
||||
|
||||
PacketPlayOutAnimation packetPlayOutAnimation = new PacketPlayOutAnimation();
|
||||
|
||||
Reflection.getField(packetPlayOutAnimation.getClass(), "a", int.class)
|
||||
.set(packetPlayOutAnimation, entityId);
|
||||
Reflection.getField(packetPlayOutAnimation.getClass(), "b", int.class)
|
||||
.set(packetPlayOutAnimation, id);
|
||||
.set(packetPlayOutAnimation, npcAnimation.getId());
|
||||
|
||||
return packetPlayOutAnimation;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_9_R1</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -109,6 +110,14 @@ public class NPC_v1_9_R1 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib-nms</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-nms-v1_9_R2</artifactId>
|
||||
|
|
|
@ -8,6 +8,7 @@ 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.NPCAnimation;
|
||||
import net.jitse.npclib.api.state.NPCSlot;
|
||||
import net.jitse.npclib.hologram.Hologram;
|
||||
import net.jitse.npclib.internal.MinecraftVersion;
|
||||
|
@ -109,6 +110,14 @@ public class NPC_v1_9_R2 extends NPCBase {
|
|||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAnimationPacket(Player player, NPCAnimation animation) {
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
||||
|
||||
PacketPlayOutAnimation packet = new PacketPlayOutAnimationWrapper().create(animation, entityId);
|
||||
playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSkin(Skin skin) {
|
||||
GameProfile newProfile = new GameProfile(uuid, name);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<parent>
|
||||
<groupId>net.jitse</groupId>
|
||||
<artifactId>npclib</artifactId>
|
||||
<version>2.8-SNAPSHOT</version>
|
||||
<version>2.9-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>npclib-plugin</artifactId>
|
||||
|
|
Loading…
Reference in New Issue