Compare commits
2 Commits
2d916c7e0c
...
1b589759fb
Author | SHA1 | Date | |
---|---|---|---|
1b589759fb | |||
6ee14b4782 |
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>T2CodeLib</artifactId>
|
<artifactId>T2CodeLib</artifactId>
|
||||||
<version>14.1</version>
|
<version>14.2_DEV-1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
|
||||||
|
@ -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()) {
|
if (SelectLibConfig.getBungee()) {
|
||||||
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bcmd");
|
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bcmd");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bonlp");
|
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bonlp");
|
||||||
if (!Bukkit.getMessenger().isIncomingChannelRegistered(plugin, "t2c:bonlp")) {
|
if (!Bukkit.getMessenger().isIncomingChannelRegistered(plugin, "t2c:bonlp")) {
|
||||||
T2Csend.debug(plugin, "registerIncomingPluginChannel §et2c:bonlp");
|
T2Csend.debug(plugin, "registerIncomingPluginChannel §et2c:bonlp");
|
||||||
|
@ -132,9 +132,11 @@ public class CreateReportLog {
|
|||||||
|
|
||||||
addFileToZip("", "logs/latest.log", zip, false);
|
addFileToZip("", "logs/latest.log", zip, false);
|
||||||
|
|
||||||
for (String pl : Util.getT2cPlugins()) {
|
// for (String pl : Util.getT2cPlugins()) {
|
||||||
pluginToDebug(pl, zip);
|
// pluginToDebug(pl, zip);
|
||||||
}
|
// }
|
||||||
|
pluginToDebug(zip); //todo überprüfen
|
||||||
|
|
||||||
zip.closeEntry();
|
zip.closeEntry();
|
||||||
zip.close();
|
zip.close();
|
||||||
} catch (IOException e) {
|
} 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 {
|
private static void addFolderToZip(String path, String srcFolder, ZipOutputStream zip) throws IOException {
|
||||||
File folder = new File(srcFolder);
|
File folder = new File(srcFolder);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.t2code.t2codelib.SPIGOT.system.config.config;
|
package net.t2code.t2codelib.SPIGOT.system.config.config;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
|
import net.t2code.t2codelib.SPIGOT.system.T2CodeLibMain;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
@ -7,13 +8,21 @@ import java.io.File;
|
|||||||
|
|
||||||
public class SelectLibConfig {
|
public class SelectLibConfig {
|
||||||
|
|
||||||
|
@Getter
|
||||||
private static Boolean updateCheckOnJoin;
|
private static Boolean updateCheckOnJoin;
|
||||||
|
@Getter
|
||||||
private static Boolean t2cTestDevelopment = false;
|
private static Boolean t2cTestDevelopment = false;
|
||||||
|
@Getter
|
||||||
private static Integer updateCheckTimeInterval;
|
private static Integer updateCheckTimeInterval;
|
||||||
|
@Getter
|
||||||
private static Boolean seePreReleaseUpdates;
|
private static Boolean seePreReleaseUpdates;
|
||||||
|
@Getter
|
||||||
private static Boolean debug;
|
private static Boolean debug;
|
||||||
|
@Getter
|
||||||
private static String language;
|
private static String language;
|
||||||
|
@Getter
|
||||||
private static Boolean bungee;
|
private static Boolean bungee;
|
||||||
|
@Getter
|
||||||
private static Boolean inventoriesCloseByServerStop;
|
private static Boolean inventoriesCloseByServerStop;
|
||||||
|
|
||||||
public static void onSelect() {
|
public static void onSelect() {
|
||||||
@ -32,37 +41,4 @@ public class SelectLibConfig {
|
|||||||
bungee = yamlConfiguration.getBoolean("BungeeCord.Enable");
|
bungee = yamlConfiguration.getBoolean("BungeeCord.Enable");
|
||||||
inventoriesCloseByServerStop = yamlConfiguration.getBoolean("Player.Inventories.CloseByServerStop");
|
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",
|
"LoreEditor",
|
||||||
"Booster",
|
"Booster",
|
||||||
"AntiMapCopy",
|
"AntiMapCopy",
|
||||||
"AntiCopy"
|
"AntiCopy",
|
||||||
|
"T2C-LoginPermissionAuth"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user