This commit is contained in:
JaTiTV 2022-11-15 02:17:26 +01:00
parent d27ef185e6
commit 9986f477b2
5 changed files with 21 additions and 16 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>13.4_SNAPSHOT-2</version>
<version>13.4</version>
<packaging>jar</packaging>
<name>T2CodeLib</name>

View File

@ -208,7 +208,7 @@ public class T2CupdateAPI {
public static void onUpdateCheck(Plugin plugin, String prefix, String gitKey, Integer spigotID, String discord, Boolean updateCheckOnJoin, Boolean seePreReleaseUpdates, Integer timeInterval) {
String RepoURL = "https://git.t2code.net/api/v1/repos/" + gitKey + "/releases?limit=1";
if (!SelectLibConfig.getSeePreReleaseUpdates()) {
if (!seePreReleaseUpdates) {
RepoURL = RepoURL + "&pre-release=false";
}
if (!RepoURL.contains("?limit=1")) {

View File

@ -30,10 +30,13 @@ public class Commands {
"after <red>14</red> days!<br>The file can also be deleted manually by you via command!</dark_red><br><dark_green><hover:show_text:'<yellow>Confirm the" +
" upload</yellow>'><click:run_command:'/t2c debug createReportLog confirmupload'>upload</click></hover></dark_green> <dark_gray>|</dark_gray> " +
"<gold><hover:show_text:'<red>Do not upload</red>'><click:run_command:'/t2c debug createReportLog noupload'>keep the file on your server</click></hover></gold>");
} else T2Csend.sender(sender, "<dark_red>The debug zip file is <red>automatically uploaded</red> to T2Code's servers<br>and <red>automatically deleted</red> " +
"after <red>14</red> days!<br>The file can also be deleted manually by you via command!</dark_red><br><green>Confirm the upload with the command:" +
"</green><br><yellow>/t2c debug createReportLog confirmupload</yellow><br><red>Keep the file on your server and do not upload it with the command:" +
"</red><br><yellow>/t2c debug createReportLog noupload</yellow>");
} else T2Csend.sender(sender, "<dark_red>The debug zip file is <red>automatically uploaded</red> to T2Code's servers</dark_red>" +
"<br><dark_red>and <red>automatically deleted</red> after <red>14</red> days!</dark_red>" +
"<br><dark_red>The file can also be deleted manually by you via command!</dark_red>" +
"<br><green>Confirm the upload with the command:</green>" +
"<br><yellow>/t2c debug createReportLog confirmupload</yellow>" +
"<br><red>Keep the file on your server and do not upload it with the command:</red>" +
"<br><yellow>/t2c debug createReportLog noupload</yellow>");
break;
case 3:
Boolean upload = args[2].equalsIgnoreCase("confirmupload");

View File

@ -155,7 +155,6 @@ public class CreateReportLog {
return;
}
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("https://debug.t2code.net/uploadFile");
@ -175,15 +174,18 @@ public class CreateReportLog {
directoryTemp.delete();
if (sender instanceof Player) {
T2Csend.sender(sender, ("[prefix] <green>A DebugLog zip has been created." +
"<br>[prefix] You can download it <click:open_url:'[url]'><gold><hover:show_text:'<yellow>Download the debug file</yellow>'>here</hover></gold></click>." +
"<br>[prefix] Please enter the following key in the ticket: <gold><click:copy_to_clipboard:[key]><hover:show_text:'<yellow>Copy to clipboard</yellow>'>[key]</hover></click></gold></green>" +
"<br>[prefix]<dark_red>Do not share the download URL with anyone!</dark_red>" +
"<br>[prefix] <click:run_command:'/t2code debug deleteReportLog [key]'><hover:show_text:'<yellow>Click to delete</yellow>'><green>You can <b>delte</b> yor Debug-File by clicking me.</green></click>" +
"<br>[prefix] <color:#910d06>(If you do not delete the debug file, it will be deleted automatically after <red>14</red> days!)</color></hover>").replace("[key]", fileID)
.replace("[url]", downloadURL).replace("[prefix]",Util.getPrefix()));
"<br>[prefix] <green>You can download it <click:open_url:'[url]'><gold><hover:show_text:'<yellow>Download the debug file</yellow>'>here</hover></gold></click>." +
"<br>[prefix] <green>Please enter the following key in the ticket: <gold><click:copy_to_clipboard:[key]><hover:show_text:'<yellow>Copy to clipboard</yellow>'>[key]</hover></click></gold></green>" +
"<br>[prefix] <dark_red>Do not share the download URL with anyone!</dark_red>" +
"<br><hover:show_text:'<yellow>Click to delete</yellow>'><click:run_command:'/t2code debug deleteReportLog [key]'>[prefix] <green>You can <b>delte</b> yor Debug-File by clicking me.</green>" +
"<br>[prefix] <color:#910d06>(If you do not delete the debug file, it will be deleted automatically after <red>14</red> days!)</color></click></hover>")
.replace("[key]", fileID).replace("[url]", downloadURL).replace("[prefix]",Util.getPrefix()));
}
T2Csend.console(Util.getPrefix() + (" §6A DebugLog zip has been created. You can download it here: [url].\n§6Please enter the following key in the ticket:" +
" §e[key].\n§4Do not share the download URL with anyone!\nYou can delte yor Debug-File with the following command: /t2code debug deleteReportLog [key].")
T2Csend.console(Util.getPrefix() + (" <gold>A DebugLog zip has been created. You can download it here:</gold> <yellow>[url]</yellow>" +
"<br><gold>Please enter the following key in the ticket:</gold> <yellow>[key]</yellow>." +
"<br><dark_red>Do not share the download URL with anyone!</dark_red>" +
"<br><color:#910d06>(If you do not delete the debug file, it will be deleted automatically after <red>14</red> days!)</color>" +
"<br><dark_red>You can delte yor Debug-File with the following command:</dark_red> <red>/t2code debug deleteReportLog [key]</red>.")
.replace("[key]", fileID).replace("[url]", downloadURL));
ReportLogStorage.add(fileID);
}

View File

@ -10,7 +10,7 @@ public class Util {
}
public static String getPrefix() {
return "§8[§4T2Code§5Lib§8]";
return "<dark_gray>[<dark_red>T2Code</dark_red><dark_purple>Lib</dark_purple>]</dark_gray>";
}
public static Integer getSpigotID() {