diff --git a/src/dev/heliosares/auxprotect/core/commands/LookupCommand.java b/src/dev/heliosares/auxprotect/core/commands/LookupCommand.java index dfcaedc..c8126ee 100644 --- a/src/dev/heliosares/auxprotect/core/commands/LookupCommand.java +++ b/src/dev/heliosares/auxprotect/core/commands/LookupCommand.java @@ -395,7 +395,7 @@ public class LookupCommand extends Command { List points = PlaybackSolver.getLocations(plugin, rs, 0); List 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; diff --git a/src/dev/heliosares/auxprotect/database/PosEntry.java b/src/dev/heliosares/auxprotect/database/PosEntry.java index 1359130..3135567 100644 --- a/src/dev/heliosares/auxprotect/database/PosEntry.java +++ b/src/dev/heliosares/auxprotect/database/PosEntry.java @@ -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; } diff --git a/src/dev/heliosares/auxprotect/utils/PlaybackSolver.java b/src/dev/heliosares/auxprotect/utils/PlaybackSolver.java index baca545..a6fb32a 100644 --- a/src/dev/heliosares/auxprotect/utils/PlaybackSolver.java +++ b/src/dev/heliosares/auxprotect/utils/PlaybackSolver.java @@ -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, ""); - } - } }