Skip to content

Commit

Permalink
Fix CoreProtect API hasPlaced() and hasRemoved() (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
takejohn committed Aug 21, 2023
1 parent 1b6d2ec commit 3ab51fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/net/coreprotect/CoreProtectAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ public boolean hasPlaced(String user, Block block, int time, int offset) {
boolean match = false;

if (Config.getGlobal().API_ENABLED) {
long timestamp = System.currentTimeMillis() / 1000L;
long offsetTime = timestamp - offset;
long timestamp = System.currentTimeMillis();
long offsetTime = timestamp - offset * 1000L;
List<String[]> check = blockLookup(block, time);

for (String[] value : check) {
Expand All @@ -212,8 +212,8 @@ public boolean hasRemoved(String user, Block block, int time, int offset) {
boolean match = false;

if (Config.getGlobal().API_ENABLED) {
long timestamp = System.currentTimeMillis() / 1000L;
long offsetTime = timestamp - offset;
long timestamp = System.currentTimeMillis();
long offsetTime = timestamp - offset * 1000L;
List<String[]> check = blockLookup(block, time);

for (String[] value : check) {
Expand Down

0 comments on commit 3ab51fc

Please sign in to comment.