Log loaded + enabled plugins
This commit is contained in:
parent
7e41a6cd70
commit
627672920c
@ -120,14 +120,19 @@ public class PluginManager
|
|||||||
*/
|
*/
|
||||||
public void enablePlugins()
|
public void enablePlugins()
|
||||||
{
|
{
|
||||||
for (Map.Entry<String, Plugin> plugin : plugins.entrySet())
|
for (Map.Entry<String, Plugin> entry : plugins.entrySet())
|
||||||
{
|
{
|
||||||
|
Plugin plugin = entry.getValue();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
plugin.getValue().onEnable();
|
plugin.onEnable();
|
||||||
|
ProxyServer.getInstance().getLogger().log(Level.INFO, "Enabled plugin {0} version {1} by {2}", new Object[]
|
||||||
|
{
|
||||||
|
entry.getKey(), plugin.getDescription().getVersion(), plugin.getDescription().getAuthor()
|
||||||
|
});
|
||||||
} catch (Exception ex)
|
} catch (Exception ex)
|
||||||
{
|
{
|
||||||
ProxyServer.getInstance().getLogger().log(Level.WARNING, "Exception encountered when loading plugin: " + plugin.getKey(), ex);
|
ProxyServer.getInstance().getLogger().log(Level.WARNING, "Exception encountered when loading plugin: " + entry.getKey(), ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -161,6 +166,10 @@ public class PluginManager
|
|||||||
plugin.init(desc);
|
plugin.init(desc);
|
||||||
plugins.put(pdf.getName(), plugin);
|
plugins.put(pdf.getName(), plugin);
|
||||||
plugin.onLoad();
|
plugin.onLoad();
|
||||||
|
ProxyServer.getInstance().getLogger().log(Level.INFO, "Loaded plugin {0} version {1} by {2}", new Object[]
|
||||||
|
{
|
||||||
|
plugin.getDescription().getName(), plugin.getDescription().getVersion(), plugin.getDescription().getAuthor()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user