mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-05 00:56:42 +00:00
Move Plex to API-driven plugin and fix NoClassDefFoundError on startup
This commit is contained in:
@ -0,0 +1,33 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user