Changed additional timestamp values to long types

This commit is contained in:
Intelli 2021-12-16 18:08:56 -07:00
parent 08aeb5d5aa
commit d7ee5257dd
17 changed files with 44 additions and 46 deletions

View file

@ -24,7 +24,7 @@ import net.coreprotect.utility.Util;
public class ContainerRollback extends Queue {
public static void performContainerRollbackRestore(Statement statement, CommandSender user, List<String> checkUuids, List<String> checkUsers, String timeString, List<Object> restrictList, List<Object> excludeList, List<String> excludeUserList, List<Integer> actionList, final Location location, Integer[] radius, int checkTime, boolean restrictWorld, boolean lookup, boolean verbose, final int rollbackType) {
public static void performContainerRollbackRestore(Statement statement, CommandSender user, List<String> checkUuids, List<String> checkUsers, String timeString, List<Object> restrictList, List<Object> excludeList, List<String> excludeUserList, List<Integer> actionList, final Location location, Integer[] radius, long checkTime, boolean restrictWorld, boolean lookup, boolean verbose, final int rollbackType) {
try {
long startTime = System.currentTimeMillis();

View file

@ -75,7 +75,7 @@ public class Lookup extends Queue {
return newList;
}
public static int countLookupRows(Statement statement, CommandSender user, List<String> checkUuids, List<String> checkUsers, List<Object> restrictList, List<Object> excludeList, List<String> excludeUserList, List<Integer> actionList, Location location, Integer[] radius, int checkTime, boolean restrictWorld, boolean lookup) {
public static int countLookupRows(Statement statement, CommandSender user, List<String> checkUuids, List<String> checkUsers, List<Object> restrictList, List<Object> excludeList, List<String> excludeUserList, List<Integer> actionList, Location location, Integer[] radius, long checkTime, boolean restrictWorld, boolean lookup) {
int rows = 0;
try {

View file

@ -12,7 +12,6 @@ import net.coreprotect.config.ConfigHandler;
import net.coreprotect.database.statement.UserStatement;
import net.coreprotect.language.Phrase;
import net.coreprotect.language.Selector;
import net.coreprotect.utility.Chat;
import net.coreprotect.utility.Color;
import net.coreprotect.utility.Util;
@ -45,9 +44,9 @@ public class BlockLookup {
int x = block.getX();
int y = block.getY();
int z = block.getZ();
int time = (int) (System.currentTimeMillis() / 1000L);
long time = (System.currentTimeMillis() / 1000L);
int worldId = Util.getWorldId(block.getWorld().getName());
int checkTime = 0;
long checkTime = 0;
int count = 0;
int rowMax = page * limit;
int page_start = rowMax - limit;
@ -75,7 +74,7 @@ public class BlockLookup {
int resultAction = results.getInt("action");
int resultType = results.getInt("type");
int resultData = results.getInt("data");
int resultTime = results.getInt("time");
long resultTime = results.getLong("time");
int resultRolledBack = results.getInt("rolled_back");
if (ConfigHandler.playerIdCacheReversed.get(resultUserId) == null) {

View file

@ -12,7 +12,6 @@ import net.coreprotect.config.ConfigHandler;
import net.coreprotect.database.statement.UserStatement;
import net.coreprotect.language.Phrase;
import net.coreprotect.language.Selector;
import net.coreprotect.utility.Chat;
import net.coreprotect.utility.Color;
import net.coreprotect.utility.Util;
@ -48,7 +47,7 @@ public class ChestTransactionLookup {
int x2 = (int) Math.ceil(l.getX());
int y2 = (int) Math.ceil(l.getY());
int z2 = (int) Math.ceil(l.getZ());
int time = (int) (System.currentTimeMillis() / 1000L);
long time = (System.currentTimeMillis() / 1000L);
int worldId = Util.getWorldId(l.getWorld().getName());
int count = 0;
int rowMax = page * limit;
@ -79,7 +78,7 @@ public class ChestTransactionLookup {
int resultAction = results.getInt("action");
int resultType = results.getInt("type");
int resultData = results.getInt("data");
int resultTime = results.getInt("time");
long resultTime = results.getLong("time");
int resultAmount = results.getInt("amount");
int resultRolledBack = results.getInt("rolled_back");

View file

@ -12,7 +12,6 @@ import net.coreprotect.config.ConfigHandler;
import net.coreprotect.database.statement.UserStatement;
import net.coreprotect.language.Phrase;
import net.coreprotect.language.Selector;
import net.coreprotect.utility.Chat;
import net.coreprotect.utility.Color;
import net.coreprotect.utility.Util;
@ -73,7 +72,7 @@ public class InteractionLookup {
int resultAction = results.getInt("action");
int resultType = results.getInt("type");
int resultData = results.getInt("data");
int resultTime = results.getInt("time");
long resultTime = results.getLong("time");
int resultRolledBack = results.getInt("rolled_back");
if (ConfigHandler.playerIdCacheReversed.get(resultUserId) == null) {

View file

@ -44,7 +44,7 @@ public class SignMessageLookup {
int x = l.getBlockX();
int y = l.getBlockY();
int z = l.getBlockZ();
int time = (int) (System.currentTimeMillis() / 1000L);
long time = (System.currentTimeMillis() / 1000L);
int worldId = Util.getWorldId(l.getWorld().getName());
int count = 0;
int rowMax = page * limit;
@ -64,7 +64,7 @@ public class SignMessageLookup {
results = statement.executeQuery(query);
while (results.next()) {
int resultTime = results.getInt("time");
long resultTime = results.getLong("time");
int resultUserId = results.getInt("user");
String line1 = results.getString("line_1");
String line2 = results.getString("line_2");