mirror of https://github.com/plexusorg/Plex.git
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;
|
|
}
|
|
} |