Deprecated AbstractProxy

This commit is contained in:
Auxilor
2021-12-13 12:05:49 +00:00
parent db7ac55eb2
commit a776b60f86
11 changed files with 17 additions and 30 deletions

View File

@@ -14,7 +14,6 @@ import com.willfp.eco.core.factory.NamespacedKeyFactory;
import com.willfp.eco.core.factory.RunnableFactory;
import com.willfp.eco.core.integrations.IntegrationLoader;
import com.willfp.eco.core.integrations.placeholder.PlaceholderManager;
import com.willfp.eco.core.proxy.AbstractProxy;
import com.willfp.eco.core.proxy.ProxyFactory;
import com.willfp.eco.core.scheduling.Scheduler;
import com.willfp.eco.core.web.UpdateChecker;
@@ -637,7 +636,7 @@ public abstract class EcoPlugin extends JavaPlugin implements PluginLike {
* @param <T> The proxy type.
* @return The proxy.
*/
public final <T extends AbstractProxy> T getProxy(@NotNull final Class<T> proxyClass) {
public final <T> T getProxy(@NotNull final Class<T> proxyClass) {
Validate.notNull(proxyFactory, "Plugin does not support proxy!");
return proxyFactory.getProxy(proxyClass);

View File

@@ -1,14 +1,12 @@
package com.willfp.eco.core.proxy;
/**
* All proxies must implement this interface.
* <p>
* A proxy is an NMS implementation of a proxy interface.
* <p>
* This allows for cross-version support.
* <p>
* See the core-spigot and core-nms modules of eco to see an example.
* Prior to 6.17.0, all proxies were required to implement this interface,
* however it produced no functionality and was not even used internally.
*
* @deprecated Unused class, not required.
*/
@Deprecated
public interface AbstractProxy {
}

View File

@@ -13,5 +13,5 @@ public interface ProxyFactory {
* @param <T> The proxy class.
* @return The proxy implementation.
*/
<T extends AbstractProxy> @NotNull T getProxy(@NotNull Class<T> proxyClass);
<T> @NotNull T getProxy(@NotNull Class<T> proxyClass);
}