mirror of
https://github.com/plexusorg/Plex.git
synced 2025-04-06 03:03:14 +00:00
34 lines
647 B
Java
34 lines
647 B
Java
package dev.plex.services.impl;
|
|
|
|
import dev.plex.services.AbstractService;
|
|
import org.bukkit.Bukkit;
|
|
|
|
public class UpdateCheckerService extends AbstractService
|
|
{
|
|
private boolean newVersion = false;
|
|
|
|
public UpdateCheckerService()
|
|
{
|
|
super(true, true);
|
|
}
|
|
|
|
@Override
|
|
public void run()
|
|
{
|
|
if (!newVersion)
|
|
{
|
|
if (plugin.getUpdateChecker().getUpdateStatusMessage(Bukkit.getConsoleSender(), false, 1))
|
|
{
|
|
newVersion = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public int repeatInSeconds()
|
|
{
|
|
// Every 30 minutes
|
|
return 1800;
|
|
}
|
|
}
|