Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
37db515726 | |||
|
6c412f5360 | ||
0fcf436dbf | |||
1762afce07 | |||
9916040c63 | |||
1b589759fb | |||
6ee14b4782 | |||
|
2d916c7e0c |
37
.gitea/ISSUE_TEMPLATE/bug_report.md
Normal file
37
.gitea/ISSUE_TEMPLATE/bug_report.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels:
|
||||
- "bug report"
|
||||
|
||||
---
|
||||
|
||||
**Description of issue:**
|
||||
|
||||
|
||||
---
|
||||
|
||||
**Plugin Version (using`/t2c info`):**
|
||||
|
||||
**Server Type (Spigot/Paperspigot/etc):**
|
||||
|
||||
**Server Version (using `/ver`):**
|
||||
|
||||
**Relevant plugins (Delete if this isn't needed):**
|
||||
|
||||
---
|
||||
|
||||
**ERROR (DELETE IF YOU HAVE NO ERROR):**
|
||||
```
|
||||
######################
|
||||
## REPLACE WITH ERROR ##
|
||||
######################
|
||||
```
|
||||
|
||||
**CONFIG SECTION (DELETE IF NOT RELEVANT):**
|
||||
```
|
||||
#######################################
|
||||
## REPLACE WITH RELEVANT CONFIG SECTION ##
|
||||
#######################################
|
||||
```
|
21
.gitea/ISSUE_TEMPLATE/feature_request.md
Normal file
21
.gitea/ISSUE_TEMPLATE/feature_request.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea/improvement
|
||||
title: ''
|
||||
labels:
|
||||
- "feature request"
|
||||
|
||||
---
|
||||
|
||||
**Description of feature request:**
|
||||
|
||||
|
||||
---
|
||||
|
||||
**Plugin Version (using`/t2c info`):**
|
||||
|
||||
**Server Type (Spigot/Paperspigot/etc):**
|
||||
|
||||
**Server Version (using `/ver`):**
|
||||
|
||||
**Relevant plugins (Delete if this isn't needed):**
|
22
.gitea/ISSUE_TEMPLATE/question.md
Normal file
22
.gitea/ISSUE_TEMPLATE/question.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Question
|
||||
about: Ask a question or get advice
|
||||
title: ''
|
||||
labels:
|
||||
- question
|
||||
|
||||
---
|
||||
|
||||
**Share your question here:**
|
||||
|
||||
---
|
||||
|
||||
**Plugin Version (using`/t2c info`):**
|
||||
|
||||
**Server Type (Spigot/Paperspigot/etc):**
|
||||
|
||||
**Server Version (using `/ver`):**
|
||||
|
||||
**Relevant plugins (Delete if this isn't needed):**
|
||||
|
||||
---
|
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>T2CodeLib</artifactId>
|
||||
<version>14.1</version>
|
||||
<version>14.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
|
@@ -104,7 +104,7 @@ public class T2Ctemplate {
|
||||
String pr = premiumVerified != null ? "<br><dark_red>║</dark_red> <yellow>Premium verified:</yellow> [pr]".replace("[pr]", premiumVerified ? "<dark_green>YES</dark_green>" : "<red>NO</red>") : "";
|
||||
|
||||
String stMSG = text == null || text.equals("") ? "" : "<br><dark_red>║</dark_red> " + text + "<br>";
|
||||
T2Csend.sender(sender, "<dark_red>╔══════════════════════════════════════</dark_red>"
|
||||
T2Csend.sender(sender, "<dark_red>╔════════════════════════════════</dark_red>"
|
||||
+ "<br>" + stPlugin
|
||||
+ stMSG
|
||||
+ stVersion
|
||||
@@ -113,7 +113,7 @@ public class T2Ctemplate {
|
||||
+ "<br>" + stStable
|
||||
+ "<br>" + stLink
|
||||
+ pr
|
||||
+ "<br><dark_red>╚══════════════════════════════════════</dark_red>");
|
||||
+ "<br><dark_red>╚════════════════════════════════</dark_red>");
|
||||
}
|
||||
|
||||
public static void sendInfo(CommandSender sender, Plugin plugin, int spigotID, String discord, String text) {
|
||||
|
@@ -0,0 +1,37 @@
|
||||
package net.t2code.t2codelib.SPIGOT.api.yaml;
|
||||
|
||||
import net.t2code.t2codelib.SPIGOT.system.config.config.SelectLibConfig;
|
||||
|
||||
public class T2CLibConfig {
|
||||
public static Boolean getUpdateCheckOnJoin() {
|
||||
return SelectLibConfig.getUpdateCheckOnJoin();
|
||||
}
|
||||
|
||||
public static Boolean getT2cTestDevelopment() {
|
||||
return SelectLibConfig.getT2cTestDevelopment();
|
||||
}
|
||||
|
||||
public static Integer getUpdateCheckTimeInterval() {
|
||||
return SelectLibConfig.getUpdateCheckTimeInterval();
|
||||
}
|
||||
|
||||
public static Boolean getSeePreReleaseUpdates() {
|
||||
return SelectLibConfig.getSeePreReleaseUpdates();
|
||||
}
|
||||
|
||||
public static Boolean getDebug() {
|
||||
return SelectLibConfig.getDebug();
|
||||
}
|
||||
|
||||
public static String getLanguage() {
|
||||
return SelectLibConfig.getLanguage();
|
||||
}
|
||||
|
||||
public static Boolean getBungee() {
|
||||
return SelectLibConfig.getBungee();
|
||||
}
|
||||
|
||||
public static Boolean getInventoriesCloseByServerStop() {
|
||||
return SelectLibConfig.getInventoriesCloseByServerStop();
|
||||
}
|
||||
}
|
@@ -109,8 +109,6 @@ public final class T2CodeLibMain extends JavaPlugin {
|
||||
if (SelectLibConfig.getBungee()) {
|
||||
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bcmd");
|
||||
|
||||
|
||||
|
||||
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bonlp");
|
||||
if (!Bukkit.getMessenger().isIncomingChannelRegistered(plugin, "t2c:bonlp")) {
|
||||
T2Csend.debug(plugin, "registerIncomingPluginChannel §et2c:bonlp");
|
||||
|
@@ -5,6 +5,7 @@ import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
|
||||
import net.t2code.t2codelib.SPIGOT.api.bungeePlayers.T2CbungeePlayers;
|
||||
import net.t2code.t2codelib.T2CupdateObject;
|
||||
import net.t2code.t2codelib.SPIGOT.system.config.config.SelectLibConfig;
|
||||
import net.t2code.t2codelib.Util;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -41,6 +42,7 @@ public class CmdExecuter implements CommandExecutor, TabCompleter {
|
||||
return false;
|
||||
case "reloadconfig":
|
||||
SelectLibConfig.onSelect();
|
||||
T2Csend.sender(sender, Util.getPrefix() + " §2Config successfully reloaded");
|
||||
return false;
|
||||
case "debug":
|
||||
Commands.debug(sender,args);
|
||||
|
@@ -132,9 +132,11 @@ public class CreateReportLog {
|
||||
|
||||
addFileToZip("", "logs/latest.log", zip, false);
|
||||
|
||||
for (String pl : Util.getT2cPlugins()) {
|
||||
pluginToDebug(pl, zip);
|
||||
}
|
||||
// for (String pl : Util.getT2cPlugins()) {
|
||||
// pluginToDebug(pl, zip);
|
||||
// }
|
||||
pluginToDebug(zip); //todo überprüfen
|
||||
|
||||
zip.closeEntry();
|
||||
zip.close();
|
||||
} catch (IOException e) {
|
||||
@@ -206,6 +208,19 @@ public class CreateReportLog {
|
||||
}
|
||||
}
|
||||
}
|
||||
private static void pluginToDebug(ZipOutputStream zip) throws IOException {
|
||||
for (Plugin plugin : Bukkit.getPluginManager().getPlugins()){
|
||||
String plName = plugin.getDescription().getName();
|
||||
if (plName.contains("T2C-") || Util.getT2cPlugins().contains(plName)){
|
||||
File plConfigs = new File(plugin.getDataFolder().getPath());
|
||||
if (plConfigs.exists()) {
|
||||
addFolderToZip("T2Code-Plugins", plugin.getDataFolder().getPath(), zip);
|
||||
}
|
||||
File f = new File(plugin.getClass().getProtectionDomain().getCodeSource().getLocation().getPath());
|
||||
addFileToZip("T2Code-Plugins", f.getPath(), zip, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void addFolderToZip(String path, String srcFolder, ZipOutputStream zip) throws IOException {
|
||||
File folder = new File(srcFolder);
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package net.t2code.t2codelib.SPIGOT.system.config.config;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
@@ -7,13 +8,21 @@ import java.io.File;
|
||||
|
||||
public class SelectLibConfig {
|
||||
|
||||
@Getter
|
||||
private static Boolean updateCheckOnJoin;
|
||||
@Getter
|
||||
private static Boolean t2cTestDevelopment = false;
|
||||
@Getter
|
||||
private static Integer updateCheckTimeInterval;
|
||||
@Getter
|
||||
private static Boolean seePreReleaseUpdates;
|
||||
@Getter
|
||||
private static Boolean debug;
|
||||
@Getter
|
||||
private static String language;
|
||||
@Getter
|
||||
private static Boolean bungee;
|
||||
@Getter
|
||||
private static Boolean inventoriesCloseByServerStop;
|
||||
|
||||
public static void onSelect() {
|
||||
@@ -32,37 +41,4 @@ public class SelectLibConfig {
|
||||
bungee = yamlConfiguration.getBoolean("BungeeCord.Enable");
|
||||
inventoriesCloseByServerStop = yamlConfiguration.getBoolean("Player.Inventories.CloseByServerStop");
|
||||
}
|
||||
|
||||
public static Boolean getUpdateCheckOnJoin() {
|
||||
return updateCheckOnJoin;
|
||||
}
|
||||
|
||||
public static Boolean getT2cTestDevelopment() {
|
||||
return t2cTestDevelopment;
|
||||
}
|
||||
|
||||
public static Integer getUpdateCheckTimeInterval() {
|
||||
return updateCheckTimeInterval;
|
||||
}
|
||||
|
||||
public static Boolean getSeePreReleaseUpdates() {
|
||||
return seePreReleaseUpdates;
|
||||
}
|
||||
|
||||
public static Boolean getDebug() {
|
||||
return debug;
|
||||
}
|
||||
|
||||
public static String getLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
public static Boolean getBungee() {
|
||||
return bungee;
|
||||
}
|
||||
|
||||
public static Boolean getInventoriesCloseByServerStop() {
|
||||
return inventoriesCloseByServerStop;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -54,7 +54,8 @@ public class Util {
|
||||
"LoreEditor",
|
||||
"Booster",
|
||||
"AntiMapCopy",
|
||||
"AntiCopy"
|
||||
"AntiCopy",
|
||||
"T2C-LoginPermissionAuth"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user