mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2025-02-08 12:31:19 +01:00
Add comments in ShopChest.java
This commit is contained in:
parent
6ba9733aa4
commit
922fcf8c66
@ -108,14 +108,17 @@ public class ShopChest extends JavaPlugin {
|
|||||||
public void onLoad() {
|
public void onLoad() {
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
||||||
|
// Load the config
|
||||||
config = new Config(this);
|
config = new Config(this);
|
||||||
|
|
||||||
|
// Load the debugger
|
||||||
debugLogger = Config.enableDebugLog ?
|
debugLogger = Config.enableDebugLog ?
|
||||||
DebugLogger.getLogger(new File(getDataFolder(), "debug.txt"), getLogger())
|
DebugLogger.getLogger(new File(getDataFolder(), "debug.txt"), getLogger())
|
||||||
: new NullDebugLogger(getLogger());
|
: new NullDebugLogger(getLogger());
|
||||||
|
|
||||||
debugLogger.debug("Loading ShopChest version " + getDescription().getVersion());
|
debugLogger.debug("Loading ShopChest version " + getDescription().getVersion());
|
||||||
|
|
||||||
|
// Load external integrations
|
||||||
hookManager = new HookManager();
|
hookManager = new HookManager();
|
||||||
externalManager = new ExternalManager(hookManager, debugLogger);
|
externalManager = new ExternalManager(hookManager, debugLogger);
|
||||||
|
|
||||||
@ -128,6 +131,8 @@ public class ShopChest extends JavaPlugin {
|
|||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
debugLogger.debug("Enabling ShopChest version " + getDescription().getVersion());
|
debugLogger.debug("Enabling ShopChest version " + getDescription().getVersion());
|
||||||
|
|
||||||
|
// Load Vault
|
||||||
|
// TODO Load Vault in dedicated class
|
||||||
if (!getServer().getPluginManager().isPluginEnabled("Vault")) {
|
if (!getServer().getPluginManager().isPluginEnabled("Vault")) {
|
||||||
debugLogger.debug("Could not find plugin \"Vault\"");
|
debugLogger.debug("Could not find plugin \"Vault\"");
|
||||||
getLogger().severe("Could not find plugin \"Vault\"");
|
getLogger().severe("Could not find plugin \"Vault\"");
|
||||||
@ -155,18 +160,24 @@ public class ShopChest extends JavaPlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load shop utils
|
||||||
shopUtils = new ShopUtils(this);
|
shopUtils = new ShopUtils(this);
|
||||||
|
|
||||||
|
// Load language messages
|
||||||
saveResource("item_names.txt", true);
|
saveResource("item_names.txt", true);
|
||||||
LanguageUtils.load();
|
LanguageUtils.load();
|
||||||
|
|
||||||
|
// Load hologram format
|
||||||
File hologramFormatFile = new File(getDataFolder(), "hologram-format.yml");
|
File hologramFormatFile = new File(getDataFolder(), "hologram-format.yml");
|
||||||
if (!hologramFormatFile.exists()) {
|
if (!hologramFormatFile.exists()) {
|
||||||
saveResource("hologram-format.yml", false);
|
saveResource("hologram-format.yml", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
hologramFormat = new HologramFormat(this);
|
hologramFormat = new HologramFormat(this);
|
||||||
hologramFormat.load();
|
hologramFormat.load();
|
||||||
|
|
||||||
|
// Load commands
|
||||||
shopCommand = new ShopCommand(this);
|
shopCommand = new ShopCommand(this);
|
||||||
|
|
||||||
shopCreationThreadPool = new ThreadPoolExecutor(0, 8,
|
shopCreationThreadPool = new ThreadPoolExecutor(0, 8,
|
||||||
5L, TimeUnit.SECONDS, new LinkedBlockingQueue<>());
|
5L, TimeUnit.SECONDS, new LinkedBlockingQueue<>());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user