Deprecate PluginLoader and impls (#8619)

This commit is contained in:
Owen1212055 2022-12-08 16:27:37 -05:00
parent 6b6282af03
commit d7dbb07235

View file

@ -0,0 +1,67 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Date: Wed, 7 Dec 2022 19:12:54 -0500
Subject: [PATCH] Future API Plans
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/plugin/Plugin.java
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
@@ -0,0 +0,0 @@ public interface Plugin extends TabExecutor {
*
* @return PluginLoader that controls this plugin
*/
+ @Deprecated(forRemoval = true) // Paper - The PluginLoader system will not function in the near future
@NotNull
public PluginLoader getPluginLoader();
diff --git a/src/main/java/org/bukkit/plugin/PluginLoader.java b/src/main/java/org/bukkit/plugin/PluginLoader.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/plugin/PluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/PluginLoader.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
* Represents a plugin loader, which handles direct access to specific types
* of plugins
*/
+@Deprecated(forRemoval = true) // Paper - The PluginLoader system will not function in the near future
public interface PluginLoader {
/**
diff --git a/src/main/java/org/bukkit/plugin/PluginManager.java b/src/main/java/org/bukkit/plugin/PluginManager.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/plugin/PluginManager.java
+++ b/src/main/java/org/bukkit/plugin/PluginManager.java
@@ -0,0 +0,0 @@ public interface PluginManager {
* @throws IllegalArgumentException Thrown when the given Class is not a
* valid PluginLoader
*/
+ @Deprecated(forRemoval = true) // Paper - The PluginLoader system will not function in the near future
public void registerInterface(@NotNull Class<? extends PluginLoader> loader) throws IllegalArgumentException;
/**
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
/**
* Handles all plugin management from the Server
*/
+@Deprecated(forRemoval = true) // Paper - This implementation may be replaced in a future version of Paper.
+// Plugins may still reflect into this class to modify permission logic for the time being.
public final class SimplePluginManager implements PluginManager {
private final Server server;
private final Map<Pattern, PluginLoader> fileAssociations = new HashMap<Pattern, PluginLoader>();
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -0,0 +0,0 @@ import org.yaml.snakeyaml.error.YAMLException;
/**
* Represents a Java plugin loader, allowing plugins in the form of .jar
*/
+@Deprecated(forRemoval = true) // Paper - The PluginLoader system will not function in the near future. This implementation will be moved.
public final class JavaPluginLoader implements PluginLoader {
final Server server;
private static final boolean DISABLE_CLASS_PRIORITIZATION = Boolean.getBoolean("Paper.DisableClassPrioritization"); // Paper