Removed "useCurrentThread" parameter from "hidePlayer" method

This commit is contained in:
Eric 2017-05-30 20:41:49 +02:00
parent 6e8e450534
commit d4da428bc1

View File

@ -207,22 +207,10 @@ public class Hologram {
/**
* @param p Player from which the hologram should be hidden
*/
public void hidePlayer(final Player p, boolean useCurrentThread) {
if (useCurrentThread) {
sendDestroyPackets(p);
} else {
public void hidePlayer(final Player p) {
new BukkitRunnable() {
@Override
public void run() {
sendDestroyPackets(p);
}
}.runTaskAsynchronously(plugin);
}
visible.remove(p);
}
private void sendDestroyPackets(Player p) {
for (Object o : nmsArmorStands) {
try {
int id = (int) entityArmorStandClass.getMethod("getId").invoke(o);
@ -237,12 +225,9 @@ public class Hologram {
}
}
}
}.runTaskAsynchronously(plugin);
/**
* @param p Player from which the hologram should be hidden
*/
public void hidePlayer(final Player p) {
hidePlayer(p, false);
visible.remove(p);
}
/**