Tracer-entity #147
@ -24,10 +24,6 @@ import de.steamwar.bausystem.Permission;
|
|||||||
import de.steamwar.bausystem.tracer.record.RecordStateMachine;
|
import de.steamwar.bausystem.tracer.record.RecordStateMachine;
|
||||||
import de.steamwar.bausystem.tracer.show.StoredRecords;
|
import de.steamwar.bausystem.tracer.show.StoredRecords;
|
||||||
import de.steamwar.bausystem.tracer.show.TraceShowManager;
|
import de.steamwar.bausystem.tracer.show.TraceShowManager;
|
||||||
import de.steamwar.bausystem.tracer.show.mode.Advanced;
|
|
||||||
import de.steamwar.bausystem.tracer.show.mode.AdvancedNoWater;
|
|
||||||
import de.steamwar.bausystem.tracer.show.mode.Basic;
|
|
||||||
import de.steamwar.bausystem.tracer.show.mode.BasicNoWater;
|
|
||||||
import de.steamwar.bausystem.world.Welt;
|
import de.steamwar.bausystem.world.Welt;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
|
@ -49,7 +49,7 @@ public class CommandTraceTabCompleter implements TabCompleter {
|
|||||||
tabComplete.add("auto");
|
tabComplete.add("auto");
|
||||||
tabComplete.add("show");
|
tabComplete.add("show");
|
||||||
if (args[0].equalsIgnoreCase("show") && args.length == 2) {
|
if (args[0].equalsIgnoreCase("show") && args.length == 2) {
|
||||||
return manageList(new ArrayList<>(Arrays.asList("nowater", "basic", "default", "advanced", "advanced-nowater")), args, 1);
|
return manageList(new ArrayList<>(Arrays.asList("nowater", "basic", "advanced", "advanced-nowater")), args, 1);
|
||||||
}
|
}
|
||||||
tabComplete.add("hide");
|
tabComplete.add("hide");
|
||||||
tabComplete.add("delete");
|
tabComplete.add("delete");
|
||||||
|
@ -44,15 +44,16 @@ public class Advanced extends Basic {
|
|||||||
public void show(TNTPosition position) {
|
public void show(TNTPosition position) {
|
||||||
super.show(position);
|
super.show(position);
|
||||||
|
|
||||||
|
|||||||
|
if (position.isExploded()) return;
|
||||||
if (position.getVelocity() == null) return;
|
if (position.getVelocity() == null) return;
|
||||||
Vector previousLocation = position.getLocation().clone().subtract(position.getVelocity());
|
Vector nextLocation = position.getLocation().clone().add(position.getVelocity());
|
||||||
|
|
||||||
Vector updatePointY = previousLocation.clone().setY(position.getLocation().getY());
|
Vector updatePointY = position.getLocation().clone().setY(nextLocation.getY());
|
||||||
Vector updatePointXZ;
|
Vector updatePointXZ;
|
||||||
if (Math.abs(position.getVelocity().getX()) > Math.abs(position.getVelocity().getZ())) {
|
if (Math.abs(position.getVelocity().getX()) > Math.abs(position.getVelocity().getZ())) {
|
||||||
updatePointXZ = updatePointY.clone().setX(position.getLocation().getX());
|
updatePointXZ = updatePointY.clone().setX(nextLocation.getX());
|
||||||
} else {
|
} else {
|
||||||
updatePointXZ = updatePointY.clone().setZ(position.getLocation().getZ());
|
updatePointXZ = updatePointY.clone().setZ(nextLocation.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!position.getLocation().equals(updatePointY)) {
|
if (!position.getLocation().equals(updatePointY)) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Wenn ich das richtig sehe, ist dieser vector unused.
Dieser wird in Zeile 50 für die Abfrage verwendet. und zwar zweimal