Fix Advanced Tracer
Dieser Commit ist enthalten in:
Ursprung
62d223b470
Commit
dee5d9598d
@ -24,10 +24,6 @@ import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.tracer.record.RecordStateMachine;
|
||||
import de.steamwar.bausystem.tracer.show.StoredRecords;
|
||||
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 org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
|
@ -49,7 +49,7 @@ public class CommandTraceTabCompleter implements TabCompleter {
|
||||
tabComplete.add("auto");
|
||||
tabComplete.add("show");
|
||||
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("delete");
|
||||
|
@ -44,15 +44,16 @@ public class Advanced extends Basic {
|
||||
public void show(TNTPosition position) {
|
||||
super.show(position);
|
||||
|
||||
if (position.isExploded()) 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;
|
||||
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 {
|
||||
updatePointXZ = updatePointY.clone().setZ(position.getLocation().getZ());
|
||||
updatePointXZ = updatePointY.clone().setZ(nextLocation.getZ());
|
||||
}
|
||||
|
||||
if (!position.getLocation().equals(updatePointY)) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren