mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-29 19:33:51 -07:00
@@ -67,27 +67,6 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
((PluginClassLoader) classLoader).initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This method is intended for unit testing purposes when the
|
||||
* other {@linkplain #JavaPlugin(JavaPluginLoader,
|
||||
* PluginDescriptionFile, File, File) constructor} cannot be used.
|
||||
* <p>
|
||||
* Its existence may be temporary.
|
||||
* @param loader the plugin loader
|
||||
* @param server the server instance
|
||||
* @param description the plugin's description
|
||||
* @param dataFolder the plugin's data folder
|
||||
* @param file the location of the plugin
|
||||
*/
|
||||
@Deprecated
|
||||
protected JavaPlugin(final PluginLoader loader, final Server server, final PluginDescriptionFile description, final File dataFolder, final File file) {
|
||||
final ClassLoader classLoader = this.getClass().getClassLoader();
|
||||
if (classLoader instanceof PluginClassLoader) {
|
||||
throw new IllegalStateException("Cannot use initialization constructor at runtime");
|
||||
}
|
||||
init(loader, server, description, dataFolder, file, classLoader);
|
||||
}
|
||||
|
||||
protected JavaPlugin(final JavaPluginLoader loader, final PluginDescriptionFile description, final File dataFolder, final File file) {
|
||||
final ClassLoader classLoader = this.getClass().getClassLoader();
|
||||
if (classLoader instanceof PluginClassLoader) {
|
||||
@@ -296,23 +275,6 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param loader the plugin loader
|
||||
* @param server the server instance
|
||||
* @param description the plugin's description
|
||||
* @param dataFolder the plugin's data folder
|
||||
* @param file the location of the plugin
|
||||
* @param classLoader the class loader
|
||||
* @deprecated This method is legacy and will be removed - it must be
|
||||
* replaced by the specially provided constructor(s).
|
||||
*/
|
||||
@Deprecated
|
||||
protected final void initialize(PluginLoader loader, Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader) {
|
||||
if (server.getWarningState() == WarningState.OFF) {
|
||||
return;
|
||||
}
|
||||
getLogger().log(Level.WARNING, getClass().getName() + " is already initialized", server.getWarningState() == WarningState.DEFAULT ? null : new AuthorNagException("Explicit initialization"));
|
||||
}
|
||||
|
||||
final void init(PluginLoader loader, Server server, PluginDescriptionFile description, File dataFolder, File file, ClassLoader classLoader) {
|
||||
this.loader = loader;
|
||||
@@ -361,18 +323,6 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
return input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the initialization status of this plugin
|
||||
*
|
||||
* @return true if this plugin is initialized, otherwise false
|
||||
* @deprecated This method cannot return false, as {@link
|
||||
* JavaPlugin} is now initialized in the constructor.
|
||||
*/
|
||||
@Deprecated
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user