mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-25 03:42:24 +00:00
Removed "useCurrentThread" parameter from "hidePlayer" method
This commit is contained in:
parent
6e8e450534
commit
d4da428bc1
@ -207,22 +207,10 @@ public class Hologram {
|
|||||||
/**
|
/**
|
||||||
* @param p Player from which the hologram should be hidden
|
* @param p Player from which the hologram should be hidden
|
||||||
*/
|
*/
|
||||||
public void hidePlayer(final Player p, boolean useCurrentThread) {
|
public void hidePlayer(final Player p) {
|
||||||
if (useCurrentThread) {
|
|
||||||
sendDestroyPackets(p);
|
|
||||||
} else {
|
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
sendDestroyPackets(p);
|
|
||||||
}
|
|
||||||
}.runTaskAsynchronously(plugin);
|
|
||||||
}
|
|
||||||
|
|
||||||
visible.remove(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void sendDestroyPackets(Player p) {
|
|
||||||
for (Object o : nmsArmorStands) {
|
for (Object o : nmsArmorStands) {
|
||||||
try {
|
try {
|
||||||
int id = (int) entityArmorStandClass.getMethod("getId").invoke(o);
|
int id = (int) entityArmorStandClass.getMethod("getId").invoke(o);
|
||||||
@ -237,12 +225,9 @@ public class Hologram {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}.runTaskAsynchronously(plugin);
|
||||||
|
|
||||||
/**
|
visible.remove(p);
|
||||||
* @param p Player from which the hologram should be hidden
|
|
||||||
*/
|
|
||||||
public void hidePlayer(final Player p) {
|
|
||||||
hidePlayer(p, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user