Fixed bug where watcher wasn't constructed until someone sees you
This commit is contained in:
parent
005e28fe8b
commit
6b8bce622d
@ -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;
|
||||||
|
@ -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());
|
||||||
|
Loading…
Reference in New Issue
Block a user