12.6
The update checker now works asynchronously
This commit is contained in:
parent
82905c0d66
commit
a84b185812
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<version>12.5</version>
|
||||
<version>12.6</version>
|
||||
<!-- <classifier>dev-1</classifier> -->
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.t2code.lib.Spigot.Lib.eco;
|
||||
|
||||
import com.bencodez.votingplugin.VotingPluginMain;
|
||||
import com.bencodez.votingplugin.user.VotingPluginUser;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
|
||||
import net.t2code.lib.Spigot.system.T2CodeMain;
|
||||
|
@ -5,7 +5,6 @@ import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||
import net.t2code.lib.Spigot.Lib.replace.Replace;
|
||||
import net.t2code.lib.Spigot.Lib.update.UpdateAPI;
|
||||
import net.t2code.lib.Spigot.system.config.SelectLibConfig;
|
||||
import net.t2code.lib.Util;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -1,8 +1,6 @@
|
||||
package net.t2code.lib.Spigot.Lib.replace;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import net.t2code.lib.Spigot.system.T2CodeMain;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -34,7 +34,7 @@ public class UpdateAPI {
|
||||
public void run() {
|
||||
join(plugin, prefix, perm, player, spigot, discord);
|
||||
}
|
||||
}.runTaskLater(plugin, 20L);
|
||||
}.runTaskLaterAsynchronously(plugin, 20L);
|
||||
return;
|
||||
}
|
||||
String publicVersion = UpdateAPI.PluginVersionen.get(plugin.getName()).publicVersion;
|
||||
@ -45,12 +45,12 @@ public class UpdateAPI {
|
||||
}
|
||||
|
||||
private static void use(Plugin plugin, String prefix, Player player, String pluginVersion, String publicVersion, String spigot, String discord) {
|
||||
Bukkit.getScheduler().runTaskLater(plugin, new Runnable() {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
UpdateAPI.sendUpdateMsg(prefix, spigot, discord, pluginVersion, publicVersion, player);
|
||||
}
|
||||
}, 200L);
|
||||
}.runTaskLaterAsynchronously(plugin, 200L);
|
||||
}
|
||||
|
||||
public static void sendUpdateMsg(String Prefix, String Spigot, String Discord, String pluginVersion, String publicVersion) {
|
||||
|
Loading…
Reference in New Issue
Block a user