mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-04 16:56:40 +00:00
- Add update checking - World generation is broken - Won't compile unless 1.18.2 is in your local Maven repository - No longer need MiniMessage bundled in Plex - Customizable namehistory - Set comments in config.yml if they're missing
33 lines
569 B
Java
33 lines
569 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;
|
|
}
|
|
}
|