Fix Trace show/hide Bug #86
@ -25,11 +25,6 @@ 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};
|
||||
}
|
||||
@ -57,14 +52,7 @@ public class PlayerTraceCache_15 {
|
||||
}
|
||||
|
||||
public void show(Player player, TNTCallbackShow.ShowMode showMode) {
|
||||
if (hiding) {
|
||||
try {
|
||||
instance.wait(1000);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
if (hiding) return;
|
||||
}
|
||||
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];
|
||||
@ -98,7 +86,7 @@ public class PlayerTraceCache_15 {
|
||||
}
|
||||
}
|
||||
|
||||
public void hide(Player player) {
|
||||
public void hideBlockTraces(Player player) {
|
||||
hiding = true;
|
||||
if (positions.length == 0 || positions.length % 3 != 0) return;
|
||||
for (int i = 0; i < positions.length; i += 3) {
|
||||
@ -119,7 +107,6 @@ 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) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package de.steamwar.bausystem.tracer;
|
||||
|
||||
import de.steamwar.bausystem.tracer.debugcallback.DebugCallbackActionBar;
|
||||
import de.steamwar.bausystem.tracer.showcallback.TNTCallbackCacheUpdate;
|
||||
import de.steamwar.bausystem.tracer.showcallback.TNTCallbackShow;
|
||||
import de.steamwar.bausystem.tracer.updatecallback.*;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
@ -158,10 +157,10 @@ class TNTTracer_15 {
|
||||
return result;
|
||||
}
|
||||
|
||||
static void hide(Player p) {
|
||||
static void hideBlockTraces(Player p) {
|
||||
PlayerTraceCache_15 tracerCache15 = playerMap.get(p);
|
||||
if (tracerCache15 == null) return;
|
||||
tracerCache15.hide(p);
|
||||
tracerCache15.hideBlockTraces(p);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ public class CommandTrace implements CommandExecutor {
|
||||
ShowManager.get(player).addSelection(tntID);
|
||||
player.sendMessage(BauSystem.PREFIX + "§aTNT-Positionen des TNT mit ID " + tntID + " angezeigt");
|
||||
player.sendMessage(BauSystem.PREFIX + "§eBei zu vielen zu zeigenden Positionen wird der Block Tracer aktiviert");
|
||||
player.sendMessage(BauSystem.PREFIX + "§eBitte aktiviere animiertes Feuer in den Grafikeinstellungen");
|
||||
// player.sendMessage(BauSystem.PREFIX + "§eBitte aktiviere animiertes Feuer in den Grafikeinstellungen");
|
||||
} catch (NumberFormatException e) {
|
||||
help15(player);
|
||||
}
|
||||
@ -151,7 +151,7 @@ public class CommandTrace implements CommandExecutor {
|
||||
ShowManager.get(player).show();
|
||||
player.sendMessage(BauSystem.PREFIX + "§aAlle TNT-Positionen angezeigt");
|
||||
player.sendMessage(BauSystem.PREFIX + "§eBei zu vielen zu zeigenden Positionen wird der Block Tracer aktiviert");
|
||||
player.sendMessage(BauSystem.PREFIX + "§eBitte aktiviere animiertes Feuer in den Grafikeinstellungen");
|
||||
// player.sendMessage(BauSystem.PREFIX + "§eBitte aktiviere animiertes Feuer in den Grafikeinstellungen");
|
||||
break;
|
||||
case "hide":
|
||||
if (args.length == 2) {
|
||||
|
@ -302,7 +302,7 @@ public class TNTTracer15 {
|
||||
}
|
||||
|
||||
public static void hideBlockTraces(Player p) {
|
||||
TNTTracer_15.hide(p);
|
||||
TNTTracer_15.hideBlockTraces(p);
|
||||
}
|
||||
|
||||
public static void start() {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren