mirror of
https://github.com/plexusorg/Plex.git
synced 2024-05-12 23:51:31 +00:00
c82586b02a
Backport changes from 1.18.2
32 lines
568 B
Java
32 lines
568 B
Java
package dev.plex.services.impl;
|
|
|
|
import dev.plex.services.AbstractService;
|
|
|
|
public class UpdateCheckerService extends AbstractService
|
|
{
|
|
public UpdateCheckerService()
|
|
{
|
|
super(true, true);
|
|
}
|
|
|
|
private boolean newVersion = false;
|
|
|
|
@Override
|
|
public void run()
|
|
{
|
|
if (!newVersion)
|
|
{
|
|
if (plugin.getUpdateChecker().check())
|
|
{
|
|
newVersion = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public int repeatInSeconds()
|
|
{
|
|
// Every 30 minutes
|
|
return 1800;
|
|
}
|
|
} |