Paper/patches/api/0417-Future-API-Plans.patch
Jake Potrebic 1143b63663
Add Position (#7639)
* Add Position

* move Position patch to start
2022-12-10 16:50:32 -08:00

68 lines
3.8 KiB
Diff

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 08aef59d8443038771704d9587e31f299e587307..cdf496598839380e073d7ccd89af473e9a702f00 100644
--- a/src/main/java/org/bukkit/plugin/Plugin.java
+++ b/src/main/java/org/bukkit/plugin/Plugin.java
@@ -94,6 +94,7 @@ 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 256e440e699942e3c9da4205bb964bdc10ec92c4..a11515b81575fc42c771a218a81fea8f05d2289d 100644
--- a/src/main/java/org/bukkit/plugin/PluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/PluginLoader.java
@@ -12,6 +12,7 @@ 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 0d1b20f2b5580ea5505ccc2f003925dbcee67199..efc04803a1eab01053a1f003d6feb2b712165d69 100644
--- a/src/main/java/org/bukkit/plugin/PluginManager.java
+++ b/src/main/java/org/bukkit/plugin/PluginManager.java
@@ -23,6 +23,7 @@ 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 9db611841b73fed8dc8a71f4d7fdef95af3cf89d..b012ce40d82389c29d1b841ff685425ac10a7f9e 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -43,6 +43,8 @@ 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 8ff78fad47f6086aa289e32590f4fbec24b3d500..7e5149a21b6747f64425a277c142e69f0ef43b3f 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -49,6 +49,7 @@ 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