Upload folder via GUI - src
This commit is contained in:
@@ -115,11 +115,18 @@ public class TicketPlugin extends JavaPlugin {
|
||||
// Manager, GUI, FAQ & Discord-Webhook initialisieren
|
||||
categoryManager = new CategoryManager(this);
|
||||
ticketManager = new TicketManager(this);
|
||||
faqManager = new FaqManager(this);
|
||||
ticketGUI = new TicketGUI(this);
|
||||
faqGUI = new FaqGUI(this);
|
||||
discordWebhook = new DiscordWebhook(this);
|
||||
|
||||
// ── FAQ-System (nur initialisieren wenn aktiviert) ─────────────────
|
||||
if (isFaqEnabled()) {
|
||||
faqManager = new FaqManager(this);
|
||||
faqGUI = new FaqGUI(this);
|
||||
getLogger().info("[FAQ] FAQ-System aktiviert.");
|
||||
} else {
|
||||
getLogger().info("[FAQ] FAQ-System deaktiviert (faq-enabled: false in config.yml).");
|
||||
}
|
||||
|
||||
if (getConfig().getBoolean("discord.enabled", false)) {
|
||||
String url = getConfig().getString("discord.webhook-url", "");
|
||||
if (url.isEmpty()) {
|
||||
@@ -134,7 +141,9 @@ public class TicketPlugin extends JavaPlugin {
|
||||
|
||||
getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(ticketGUI, this);
|
||||
getServer().getPluginManager().registerEvents(faqGUI, this);
|
||||
if (faqGUI != null) {
|
||||
getServer().getPluginManager().registerEvents(faqGUI, this);
|
||||
}
|
||||
|
||||
// Automatische Archivierung
|
||||
int archiveIntervalH = getConfig().getInt("auto-archive-interval-hours", 24);
|
||||
@@ -166,6 +175,9 @@ public class TicketPlugin extends JavaPlugin {
|
||||
if (webServer != null) webServer.stop();
|
||||
if (ticketCache != null) ticketCache.clear();
|
||||
if (databaseManager != null) databaseManager.disconnect();
|
||||
// Adventure BukkitAudiences sauber schließen
|
||||
if (languageManager != null && languageManager.getAudiences() != null)
|
||||
languageManager.getAudiences().close();
|
||||
getLogger().info("TicketSystem wurde deaktiviert.");
|
||||
}
|
||||
|
||||
@@ -322,6 +334,14 @@ public class TicketPlugin extends JavaPlugin {
|
||||
TicketPriority.reloadLocalizedNames(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gibt zurück ob das FAQ-System aktiviert ist.
|
||||
* Konfigurierbar in config.yml → faq-enabled (Standard: true)
|
||||
*/
|
||||
public boolean isFaqEnabled() {
|
||||
return getConfig().getBoolean("faq-enabled", true);
|
||||
}
|
||||
|
||||
public static TicketPlugin getInstance() { return instance; }
|
||||
public LanguageManager getLanguageManager() { return languageManager; }
|
||||
public DatabaseManager getDatabaseManager() { return databaseManager; }
|
||||
|
||||
Reference in New Issue
Block a user