main #10

Closed
Jakob wants to merge 9 commits from main into NewUpdateChecker
6 changed files with 18 additions and 13 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>13.2</version> <version>13.3</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>T2CodeLib</name> <name>T2CodeLib</name>
@ -86,12 +86,12 @@
<id>BenCodez Repo</id> <id>BenCodez Repo</id>
<url>https://nexus.bencodez.com/repository/maven-public/</url> <url>https://nexus.bencodez.com/repository/maven-public/</url>
</repository> </repository>
<!--Kyori MiniMessage--> <!--Kyori MiniMessage
<repository> <repository>
<id>sonatype-oss-snapshots1</id> <id>sonatype-oss-snapshots1</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url> <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository> </repository>-->
</repositories> </repositories>
@ -145,7 +145,7 @@
<dependency> <dependency>
<groupId>net.kyori</groupId> <groupId>net.kyori</groupId>
<artifactId>adventure-platform-bukkit</artifactId> <artifactId>adventure-platform-bukkit</artifactId>
<version>4.1.3-SNAPSHOT</version> <version>4.1.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -16,11 +16,12 @@ public class T2CminiMessage {
public static void sendMiniMessage(String msg) { public static void sendMiniMessage(String msg) {
T2CodeLibMain.adventure().console().sendMessage(replace(msg)); T2CodeLibMain.adventure().console().sendMessage(replace(msg));
} }
public static void miniMessage(String msg, Player player){
public static void miniMessage(String msg, Player player) {
T2CodeLibMain.adventure().player(player).sendMessage(replace(msg)); T2CodeLibMain.adventure().player(player).sendMessage(replace(msg));
} }
protected static Component replace(String text){ protected static Component replace(String text) {
return MiniMessage.miniMessage().deserialize(T2Creplace.convertColorCode(text)); return MiniMessage.miniMessage().deserialize(T2Creplace.convertColorCode(text));
} }
} }

View File

@ -6,18 +6,15 @@ public class T2CupdateObject {
public String pluginName; public String pluginName;
public String pluginVersion; public String pluginVersion;
public String publicVersion; public String publicVersion;
public String changeLog;
public Boolean load; public Boolean load;
public T2CupdateObject(String pluginName, public T2CupdateObject(String pluginName,
String pluginVersion, String pluginVersion,
String publicVersion , String publicVersion,
String changeLog ,
Boolean load) { Boolean load) {
this.pluginName = pluginName; this.pluginName = pluginName;
this.pluginVersion = pluginVersion; this.pluginVersion = pluginVersion;
this.publicVersion = publicVersion; this.publicVersion = publicVersion;
this.changeLog = changeLog; this.load = load;
this.load=load;
} }
} }

View File

@ -5,6 +5,7 @@ import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
import net.t2code.t2codelib.SPIGOT.system.CreateReportLog; import net.t2code.t2codelib.SPIGOT.system.CreateReportLog;
import net.t2code.t2codelib.SPIGOT.system.config.config.SelectLibConfig; import net.t2code.t2codelib.SPIGOT.system.config.config.SelectLibConfig;
import net.t2code.t2codelib.Util; import net.t2code.t2codelib.Util;
import org.bukkit.Bukkit;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@ -44,7 +45,12 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
return false; return false;
} }
if ("createreportlog".equals(args[1].toLowerCase())) { if ("createreportlog".equals(args[1].toLowerCase())) {
Bukkit.getScheduler().runTaskAsynchronously(T2CodeLibMain.getPlugin(), new Runnable() {
@Override
public void run() {
CreateReportLog.create(sender); CreateReportLog.create(sender);
}
});
} else T2Csend.sender(sender, "§4Use: §7/t2code debug createReportLog"); } else T2Csend.sender(sender, "§4Use: §7/t2code debug createReportLog");
return false; return false;

View File

@ -159,6 +159,7 @@ public final class T2CodeLibMain extends JavaPlugin {
if (adventure == null) { if (adventure == null) {
throw new IllegalStateException("Tried to access Adventure when the plugin was disabled!"); throw new IllegalStateException("Tried to access Adventure when the plugin was disabled!");
} }
Bukkit.getConsoleSender().sendMessage(Util.getPrefix() + " Adventure load");
return adventure; return adventure;
} }

View File

@ -31,7 +31,7 @@ public class Util {
public static List<String> getT2cPlugins() { public static List<String> getT2cPlugins() {
return Arrays.asList( return Arrays.asList(
"T2CodeLib", //"T2CodeLib",
"T2C-LuckyBox", "T2C-LuckyBox",
"WonderBagShop", "WonderBagShop",
"CommandGUI", "CommandGUI",