Combine PlaybackSolver.PosEntry with PosEntry
This commit is contained in:
@@ -395,7 +395,7 @@ public class LookupCommand extends Command {
|
||||
List<PlaybackSolver.PosPoint> points = PlaybackSolver.getLocations(plugin, rs, 0);
|
||||
List<DbEntry> newResults = new ArrayList<>();
|
||||
for (PlaybackSolver.PosPoint point : points) {
|
||||
newResults.add(new PlaybackSolver.PosEntry(point.time(), point.uid(), point.location()));
|
||||
newResults.add(new PosEntry(point.time(), point.uid(), point.location()));
|
||||
}
|
||||
Collections.reverse(newResults);
|
||||
rs = newResults;
|
||||
|
||||
@@ -23,6 +23,15 @@ public class PosEntry extends DbEntry {
|
||||
this.z = z + dInc[2];
|
||||
}
|
||||
|
||||
public PosEntry(long time, int uid, Location location) {
|
||||
super(time, uid, EntryAction.POS, false, Objects.requireNonNull(location.getWorld()).getName(),
|
||||
(int) Math.round(location.getX()), (int) Math.round(location.getY()), (int) Math.round(location.getZ()),
|
||||
Math.round(location.getPitch()), Math.round(location.getYaw()), "", -1, "");
|
||||
this.x = location.getX();
|
||||
this.y = location.getY();
|
||||
this.z = location.getZ();
|
||||
}
|
||||
|
||||
public double getDoubleX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
@@ -152,12 +152,4 @@ public class PlaybackSolver extends BukkitRunnable {
|
||||
|
||||
public record PosPoint(long time, UUID uuid, String name, int uid, Location location, boolean inc) {
|
||||
}
|
||||
|
||||
public static class PosEntry extends DbEntry {
|
||||
public PosEntry(long time, int uid, Location location) {
|
||||
super(time, uid, EntryAction.POS, false, Objects.requireNonNull(location.getWorld()).getName(),
|
||||
(int) Math.round(location.getX()), (int) Math.round(location.getY()), (int) Math.round(location.getZ()),
|
||||
Math.round(location.getPitch()), Math.round(location.getYaw()), "", -1, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user