1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-19 14:59:20 +00:00

Deprecate all the API classes that will be removed in Floodgate 3.0

See #536 for more information
This commit is contained in:
Tim203
2024-09-01 20:45:10 +02:00
parent 49bd56446f
commit e7e40f59ba
8 changed files with 52 additions and 25 deletions

View File

@@ -38,9 +38,9 @@ public final class InstanceHolder {
@Getter private static PlayerLink playerLink;
@Getter private static FloodgateEventBus eventBus;
@Getter private static PlatformInjector injector;
@Getter private static PacketHandlers packetHandlers;
@Getter private static HandshakeHandlers handshakeHandlers;
private static PlatformInjector injector;
private static PacketHandlers packetHandlers;
private static HandshakeHandlers handshakeHandlers;
private static UUID storedKey;
public static boolean set(
@@ -68,4 +68,31 @@ public final class InstanceHolder {
InstanceHolder.handshakeHandlers = handshakeHandlers;
return true;
}
/**
* @deprecated Injector addons will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public static PlatformInjector getInjector() {
return InstanceHolder.injector;
}
/**
* @deprecated Packet handlers will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public static PacketHandlers getPacketHandlers() {
return InstanceHolder.packetHandlers;
}
/**
* @deprecated Handshake handlers will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public static HandshakeHandlers getHandshakeHandlers() {
return InstanceHolder.handshakeHandlers;
}
}

View File

@@ -31,11 +31,8 @@ import org.geysermc.floodgate.util.BedrockData;
import org.geysermc.floodgate.util.LinkedPlayer;
/**
* For advanced users only! You shouldn't play with this unless you know what you're doing.<br>
* <br>
* This class allows you change specific things of a Bedrock player before it is applied to the
* server. Note that at the time I'm writing this that the HandshakeData is created after requesting
* the player link. So the link is present here, if applicable.
* @deprecated Handshake handlers will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public interface HandshakeData {

View File

@@ -26,13 +26,8 @@
package org.geysermc.floodgate.api.handshake;
/**
* This class allows you to change and/or get specific data of the Bedrock client before Floodgate
* does something with this data. This means that Floodgate decrypts the data, then calls the
* handshake handlers and then applies the data to the connection.<br>
* <br>
* /!\ Note that this class will be called for both Java and Bedrock connections, but {@link
* HandshakeData#isFloodgatePlayer()} will be false and Floodgate related methods will return null
* for Java players
* @deprecated Handshake handlers will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
@FunctionalInterface

View File

@@ -26,10 +26,8 @@
package org.geysermc.floodgate.api.handshake;
/**
* @deprecated This system has been deprecated and will not be available in the new API that will be
* introduced when Geyser will include Floodgate (and thus will have some common base API).
* <br>
* It might be replaced with an event (probably internal), but that isn't certain yet.
* @deprecated Handshake handlers will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public interface HandshakeHandlers {

View File

@@ -27,6 +27,11 @@ package org.geysermc.floodgate.api.inject;
import io.netty.channel.Channel;
/**
* @deprecated Injector addons will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public interface InjectorAddon {
/**
* Called when injecting a specific channel (every client that is connected to the server has

View File

@@ -26,12 +26,10 @@
package org.geysermc.floodgate.api.inject;
/**
* The global interface of all the Platform Injectors. The injector can be used for various things.
* It is used internally for getting Floodgate data out of the handshake packet and for debug mode,
* but there is also an option to add your own addons. Note that every Floodgate platform that
* supports netty should implement this, but the platform implementation isn't required to implement
* this.
* @deprecated Injector addons will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public interface PlatformInjector {
/**
* Injects the server connection. This will allow various addons (like getting the Floodgate

View File

@@ -28,8 +28,10 @@ package org.geysermc.floodgate.api.packet;
import io.netty.channel.ChannelHandlerContext;
/**
* For advanced users only! You shouldn't play with this unless you know what you're doing.
* @deprecated Packet handlers will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public interface PacketHandler {
/**
* Called when a registered packet has been seen.

View File

@@ -28,6 +28,11 @@ package org.geysermc.floodgate.api.packet;
import io.netty.channel.ChannelHandlerContext;
import org.geysermc.floodgate.api.util.TriFunction;
/**
* @deprecated Packet handlers will be removed with the launch of Floodgate 3.0. Please look at
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
*/
@Deprecated
public interface PacketHandlers {
/**
* Register a specific class for a specific consumer.