mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-01 07:36:42 +00:00
check for update status instead of sending msg
This commit is contained in:
@ -17,6 +17,7 @@ import java.util.stream.Collectors;
|
||||
import dev.plex.util.PlexLog;
|
||||
import dev.plex.util.PlexUtils;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
@ -96,6 +97,10 @@ public class PlexCMD extends PlexCommand
|
||||
{
|
||||
return messageComponent("noPermissionConsole");
|
||||
}
|
||||
if (!plugin.getUpdateChecker().getUpdateStatus(false))
|
||||
{
|
||||
return MiniMessage.miniMessage().deserialize("<red>Plex is already up to date!");
|
||||
}
|
||||
plugin.getUpdateChecker().updateJar();
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user