Fixed bug where watcher wasn't constructed until someone sees you

This commit is contained in:
Andrew 2013-05-20 19:57:41 +12:00
parent 005e28fe8b
commit 6b8bce622d
2 changed files with 1 additions and 4 deletions

View File

@ -21,6 +21,7 @@ public class DisguiseAPI {
*/ */
public static void disguiseToAll(Player p, Disguise disguise) { public static void disguiseToAll(Player p, Disguise disguise) {
disguises.put(p.getName(), disguise); disguises.put(p.getName(), disguise);
disguise.constructPacket(p);
for (Player player : Bukkit.getOnlinePlayers()) { for (Player player : Bukkit.getOnlinePlayers()) {
if (p.getWorld() != player.getWorld()) if (p.getWorld() != player.getWorld())
continue; continue;

View File

@ -60,10 +60,6 @@ public class Disguise {
return spawnPacket; return spawnPacket;
} }
public Entity getEntity() {
return entity;
}
public Entity getEntity(World world, Location loc, int entityId) { public Entity getEntity(World world, Location loc, int entityId) {
if (entity != null) { if (entity != null) {
entity.setLocation(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch()); entity.setLocation(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());