Unpushed work.

This commit is contained in:
Jitse Boonstra
2018-12-11 21:51:37 +01:00
parent 3f3c864a54
commit ddf90fe005
67 changed files with 1719 additions and 105 deletions
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_10_R1;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_10_R1.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_10_R1 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_10_R1(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -101,4 +105,14 @@ public class NPC_v1_10_R1 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_10_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_10_R1.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_10_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_10_R1.DataWatcher;
import net.minecraft.server.v1_10_R1.DataWatcherObject;
import net.minecraft.server.v1_10_R1.DataWatcherRegistry;
import net.minecraft.server.v1_10_R1.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_10_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_10_R1.EnumGamemode;
import net.minecraft.server.v1_10_R1.IChatBaseComponent;
import net.minecraft.server.v1_10_R1.PacketPlayOutPlayerInfo;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,8 +4,8 @@
package net.jitse.npclib.nms.v1_10_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_10_R1.PacketPlayOutScoreboardTeam;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_11_R1;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_11_R1.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_11_R1 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_11_R1(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -101,4 +105,14 @@ public class NPC_v1_11_R1 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_11_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_11_R1.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_11_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_11_R1.DataWatcher;
import net.minecraft.server.v1_11_R1.DataWatcherObject;
import net.minecraft.server.v1_11_R1.DataWatcherRegistry;
import net.minecraft.server.v1_11_R1.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_11_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_11_R1.EnumGamemode;
import net.minecraft.server.v1_11_R1.IChatBaseComponent;
import net.minecraft.server.v1_11_R1.PacketPlayOutPlayerInfo;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,8 +4,8 @@
package net.jitse.npclib.nms.v1_11_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_11_R1.PacketPlayOutScoreboardTeam;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_12_R1;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_12_R1.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_12_R1 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_12_R1(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -101,4 +105,14 @@ public class NPC_v1_12_R1 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_12_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_12_R1.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_12_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_12_R1.DataWatcher;
import net.minecraft.server.v1_12_R1.DataWatcherObject;
import net.minecraft.server.v1_12_R1.DataWatcherRegistry;
import net.minecraft.server.v1_12_R1.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_12_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_12_R1.EnumGamemode;
import net.minecraft.server.v1_12_R1.IChatBaseComponent;
import net.minecraft.server.v1_12_R1.PacketPlayOutPlayerInfo;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,8 +4,8 @@
package net.jitse.npclib.nms.v1_12_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_12_R1.PacketPlayOutScoreboardTeam;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_13_R1;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_13_R1.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -13,12 +15,12 @@ import net.jitse.npclib.nms.v1_13_R1.packets.PacketPlayOutScoreboardTeamWrapper;
import net.jitse.npclib.skin.Skin;
import net.minecraft.server.v1_13_R1.*;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_13_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -31,6 +33,7 @@ public class NPC_v1_13_R1 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_13_R1(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -102,4 +105,14 @@ public class NPC_v1_13_R1 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_13_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_13_R1.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_13_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_13_R1.DataWatcher;
import net.minecraft.server.v1_13_R1.DataWatcherObject;
import net.minecraft.server.v1_13_R1.DataWatcherRegistry;
import net.minecraft.server.v1_13_R1.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_13_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_13_R1.EnumGamemode;
import net.minecraft.server.v1_13_R1.IChatBaseComponent;
import net.minecraft.server.v1_13_R1.PacketPlayOutPlayerInfo;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,10 +4,10 @@
package net.jitse.npclib.nms.v1_13_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_13_R1.ChatComponentText;
import net.minecraft.server.v1_13_R1.IChatBaseComponent;
import net.minecraft.server.v1_13_R1.PacketPlayOutScoreboardTeam;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_13_R2;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_13_R2.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_13_R2 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_13_R2(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -101,4 +105,14 @@ public class NPC_v1_13_R2 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_13_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_13_R2.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_13_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_13_R2.DataWatcher;
import net.minecraft.server.v1_13_R2.DataWatcherObject;
import net.minecraft.server.v1_13_R2.DataWatcherRegistry;
import net.minecraft.server.v1_13_R2.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_13_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_13_R2.EnumGamemode;
import net.minecraft.server.v1_13_R2.IChatBaseComponent;
import net.minecraft.server.v1_13_R2.PacketPlayOutPlayerInfo;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,10 +4,10 @@
package net.jitse.npclib.nms.v1_13_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_13_R2.ChatComponentText;
import net.minecraft.server.v1_13_R2.IChatBaseComponent;
import net.minecraft.server.v1_13_R2.PacketPlayOutScoreboardTeam;
import tinyprotocol.Reflection;
import java.util.Collection;
-6
View File
@@ -25,11 +25,5 @@
<version>2.8.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.23.Final</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_7_R4.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,10 +4,10 @@
package net.jitse.npclib.nms.v1_7_R4.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_7_R4.DataWatcher;
import net.minecraft.server.v1_7_R4.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_7_R4.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_7_R4.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_7_R4.PacketPlayOutScoreboardTeam;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_8_R1;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_8_R1.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_8_R1 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_8_R1(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -100,4 +104,14 @@ public class NPC_v1_8_R1 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_8_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R1.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,10 +4,10 @@
package net.jitse.npclib.nms.v1_8_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R1.DataWatcher;
import net.minecraft.server.v1_8_R1.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_8_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_8_R1.*;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_8_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R1.PacketPlayOutScoreboardTeam;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_8_R2;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_8_R2.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_8_R2 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_8_R2(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -100,4 +104,14 @@ public class NPC_v1_8_R2 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_8_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,10 +4,10 @@
package net.jitse.npclib.nms.v1_8_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R2.DataWatcher;
import net.minecraft.server.v1_8_R2.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,11 +4,11 @@
package net.jitse.npclib.nms.v1_8_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_8_R2.IChatBaseComponent;
import net.minecraft.server.v1_8_R2.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R2.WorldSettings;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_8_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R2.PacketPlayOutScoreboardTeam;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_8_R3;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_8_R3.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_8_R3 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_8_R3(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -101,4 +105,14 @@ public class NPC_v1_8_R3 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_8_R3.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,10 +4,10 @@
package net.jitse.npclib.nms.v1_8_R3.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,11 +4,11 @@
package net.jitse.npclib.nms.v1_8_R3.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_8_R3.IChatBaseComponent;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R3.WorldSettings;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_8_R3.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardTeam;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_9_R1;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_9_R1.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_9_R1 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_9_R1(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -101,4 +105,14 @@ public class NPC_v1_9_R1 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_9_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_9_R1.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_9_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_9_R1.DataWatcher;
import net.minecraft.server.v1_9_R1.DataWatcherObject;
import net.minecraft.server.v1_9_R1.DataWatcherRegistry;
import net.minecraft.server.v1_9_R1.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_9_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_9_R1.IChatBaseComponent;
import net.minecraft.server.v1_9_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_9_R1.WorldSettings;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,8 +4,8 @@
package net.jitse.npclib.nms.v1_9_R1.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_9_R1.PacketPlayOutScoreboardTeam;
import tinyprotocol.Reflection;
import java.util.Collection;
@@ -4,6 +4,8 @@
package net.jitse.npclib.nms.v1_9_R2;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.api.NPC;
import net.jitse.npclib.nms.holograms.Hologram;
import net.jitse.npclib.nms.v1_9_R2.packets.PacketPlayOutEntityHeadRotationWrapper;
@@ -18,6 +20,7 @@ import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.List;
import java.util.UUID;
/**
* @author Jitse Boonstra
@@ -30,6 +33,7 @@ public class NPC_v1_9_R2 extends NPC {
private PacketPlayOutPlayerInfo packetPlayOutPlayerInfoAdd, packetPlayOutPlayerInfoRemove;
private PacketPlayOutEntityHeadRotation packetPlayOutEntityHeadRotation;
private PacketPlayOutEntityDestroy packetPlayOutEntityDestroy;
private GameProfile gameProfile;
public NPC_v1_9_R2(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
super(plugin, skin, autoHideDistance, lines);
@@ -101,4 +105,14 @@ public class NPC_v1_9_R2 extends NPC {
playerConnection.sendPacket(packetPlayOutScoreboardTeamUnregister);
}
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
}
@@ -4,9 +4,9 @@
package net.jitse.npclib.nms.v1_9_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_9_R2.PacketPlayOutEntityHeadRotation;
import org.bukkit.Location;
import tinyprotocol.Reflection;
/**
* @author Jitse Boonstra
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_9_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_9_R2.DataWatcher;
import net.minecraft.server.v1_9_R2.DataWatcherObject;
import net.minecraft.server.v1_9_R2.DataWatcherRegistry;
import net.minecraft.server.v1_9_R2.PacketPlayOutNamedEntitySpawn;
import org.bukkit.Location;
import tinyprotocol.Reflection;
import java.util.UUID;
@@ -4,12 +4,12 @@
package net.jitse.npclib.nms.v1_9_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_9_R2.IChatBaseComponent;
import net.minecraft.server.v1_9_R2.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_9_R2.WorldSettings;
import org.bukkit.ChatColor;
import tinyprotocol.Reflection;
import java.util.List;
@@ -4,8 +4,8 @@
package net.jitse.npclib.nms.v1_9_R2.packets;
import com.comphenix.tinyprotocol.Reflection;
import net.minecraft.server.v1_9_R2.PacketPlayOutScoreboardTeam;
import tinyprotocol.Reflection;
import java.util.Collection;