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;