Fix Updating Issue while Tracing
Dieser Commit ist enthalten in:
Ursprung
8254fb6e5e
Commit
930e8dc7d0
@ -102,7 +102,7 @@ class TNTTracer_15 {
|
||||
private static float[] noValue = new float[0];
|
||||
|
||||
private static void update(Player p, PlayerTraceCache_15 traceCache) {
|
||||
if (tracerCallbackTracing.run()) {
|
||||
if (tracerCallbackTracing.run(p)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
package de.steamwar.bausystem.tracer.showcallback;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface TracerCallbackTracing_15 {
|
||||
|
||||
boolean run();
|
||||
boolean run(Player p);
|
||||
|
||||
}
|
||||
|
@ -45,7 +45,12 @@ public class TNTTracer15 {
|
||||
private static final float[] noValue = new float[0];
|
||||
|
||||
public static void initTNTTracer_15() {
|
||||
TNTTracer_15.init(BauSystem.getPlugin(), TNTTracer15::getTracePoints, TNTTracer15::getTraceUpdatePoints, TNTTracer15::getActionBar, TNTTracer15::showMode, p -> ShowManager.get(p).isDirty(), () -> System.currentTimeMillis() - lastExplosion < 4500);
|
||||
TNTTracer_15.init(BauSystem.getPlugin(), TNTTracer15::getTracePoints, TNTTracer15::getTraceUpdatePoints, TNTTracer15::getActionBar, TNTTracer15::showMode, p -> ShowManager.get(p).isDirty(), p -> {
|
||||
if (System.currentTimeMillis() - lastExplosion < 4500) {
|
||||
ShowManager.get(p).dirty();
|
||||
}
|
||||
return System.currentTimeMillis() - lastExplosion < 4500;
|
||||
});
|
||||
}
|
||||
|
||||
private static float[] accumulate(LinkedList<TNTTrace> traces) {
|
||||
|
@ -147,6 +147,10 @@ public class ShowStatus {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void dirty() {
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ShowStatus{" +
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren