Fix Trace show/hide Bug
Dieser Commit ist enthalten in:
Ursprung
c1ec555838
Commit
e0b885ad32
@ -25,6 +25,11 @@ public class PlayerTraceCache_15 {
|
||||
|
||||
private boolean hiding = false;
|
||||
|
||||
private PlayerTraceCache_15 instance;
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public PlayerTraceCache_15() {
|
||||
this.pLocation = new float[]{0.0F, 0.0F, 0.0F};
|
||||
}
|
||||
@ -52,7 +57,14 @@ public class PlayerTraceCache_15 {
|
||||
}
|
||||
|
||||
public void show(Player player, TNTCallbackShow.ShowMode showMode) {
|
||||
if (hiding) return;
|
||||
if (hiding) {
|
||||
try {
|
||||
instance.wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
if (hiding) return;
|
||||
}
|
||||
if (positions.length == 0 || positions.length % 3 != 0) return;
|
||||
for (int i = 0; i < positions.length; i += 3) {
|
||||
float x = positions[i + 0];
|
||||
@ -86,7 +98,7 @@ public class PlayerTraceCache_15 {
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void hide(Player player) {
|
||||
public void hide(Player player) {
|
||||
hiding = true;
|
||||
if (positions.length == 0 || positions.length % 3 != 0) return;
|
||||
for (int i = 0; i < positions.length; i += 3) {
|
||||
@ -107,6 +119,7 @@ public class PlayerTraceCache_15 {
|
||||
}
|
||||
updatePoints = new float[0];
|
||||
hiding = false;
|
||||
instance.notifyAll();
|
||||
}
|
||||
|
||||
private static void showCorner(Player player, float x, float y, float z, Particle particle) {
|
||||
|
@ -133,7 +133,6 @@ public class CommandTrace implements CommandExecutor {
|
||||
case "particle":
|
||||
case "particles":
|
||||
TNTTracer15.hideBlockTraces(player);
|
||||
ShowManager.get(player).show();
|
||||
ShowManager.get(player).setShowMode(ShowStatus.ShowMode.PARTICLE);
|
||||
break;
|
||||
default:
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren