mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 11:22:01 +01:00
Updating plugin nags to use logger
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
f398397845
commit
1257e0d24f
@ -240,7 +240,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
*/
|
||||
public void registerEvent(Event.Type type, Listener listener, Priority priority, Plugin plugin) {
|
||||
if (!plugin.isEnabled()) {
|
||||
System.out.println("Warning! Plugin '" + plugin.getDescription().getName() + "' (ver " + plugin.getDescription().getVersion() + ") is registering events before it is enabled. It may be misbehaving and the author needs to fix this.");
|
||||
server.getLogger().warning("Plugin '" + plugin.getDescription().getName() + "' (ver " + plugin.getDescription().getVersion() + ") is registering events before it is enabled. It may be misbehaving and the author needs to fix this.");
|
||||
}
|
||||
getEventListeners( type ).add(new RegisteredListener(listener, priority, plugin, type));
|
||||
}
|
||||
|
@ -40,11 +40,11 @@ public abstract class JavaPlugin implements Plugin {
|
||||
ClassLoader cLoader) {
|
||||
initialize(pluginLoader, instance, desc, folder, plugin, cLoader);
|
||||
|
||||
System.out.println("Using the stupidly long constructor " + desc.getMain() + "(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of " + desc.getName() + " to remove it! (Nothing is broken, we just like to keep code clean.)");
|
||||
server.getLogger().warning("Using the stupidly long constructor " + desc.getMain() + "(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of " + desc.getName() + " to remove it! (Nothing is broken, we just like to keep code clean.)");
|
||||
|
||||
ArrayList<String> authors = desc.getAuthors();
|
||||
if (authors.size() > 0) {
|
||||
System.out.println("Hint! It's probably someone called '" + authors.get(0) + "'");
|
||||
server.getLogger().info("Hint! It's probably someone called '" + authors.get(0) + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user