Skip to content

Commit 375c455

Browse files
committed
Merge remote-tracking branch 'upstream/master' into core-repackage
# Conflicts: # bungee/src/main/java/org/geysermc/floodgate/inject/bungee/BungeeInjector.java # bungee/src/main/java/org/geysermc/floodgate/listener/BungeeListener.java # bungee/src/main/java/org/geysermc/floodgate/pluginmessage/BungeePluginMessageUtils.java # core/src/main/java/org/geysermc/floodgate/core/pluginmessage/channel/FormChannel.java # core/src/main/java/org/geysermc/floodgate/core/pluginmessage/channel/PacketChannel.java # core/src/main/java/org/geysermc/floodgate/core/pluginmessage/channel/TransferChannel.java # core/src/main/java/org/geysermc/floodgate/core/util/Metrics.java # spigot/src/main/java/org/geysermc/floodgate/SpigotPlugin.java # spigot/src/main/java/org/geysermc/floodgate/addon/data/SpigotDataAddon.java # spigot/src/main/java/org/geysermc/floodgate/listener/PaperProfileListener.java # spigot/src/main/java/org/geysermc/floodgate/listener/SpigotListener.java # spigot/src/main/java/org/geysermc/floodgate/module/PaperListenerModule.java # spigot/src/main/java/org/geysermc/floodgate/pluginmessage/SpigotPluginMessageRegistration.java # spigot/src/main/java/org/geysermc/floodgate/util/ClassNames.java # spigot/src/main/java/org/geysermc/floodgate/util/WhitelistUtils.java # velocity/src/main/java/org/geysermc/floodgate/listener/VelocityListener.java # velocity/src/main/java/org/geysermc/floodgate/pluginmessage/VelocityPluginMessageUtils.java
2 parents 07b516f + 5a72b6a commit 375c455

51 files changed

Lines changed: 692 additions & 434 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: Build
22

3-
on: [push]
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths-ignore:
7+
- 'LICENSE'
8+
- 'README.md'
9+
- '.gitignore'
10+
- '.idea/copyright/*.xml'
11+
- '.github/workflows/pullrequest.yml'
412

513
jobs:
614
build:

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Floodgate
22

33
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
4-
[![Build Status](https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/badge/icon)](https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/)
4+
[![Build Status](https://github.com/GeyserMC/Floodgate/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/GeyserMC/Floodgate/actions/workflows/build.yml?query=branch%3Amaster)
55
[![Discord](https://img.shields.io/discord/613163671870242838.svg?color=%237289da&label=discord)](http://discord.geysermc.org/)
6-
[![HitCount](https://hits.dwyl.com/GeyserMC/Floodgate.svg)](http://hits.dwyl.com/GeyserMC/Floodgate)
6+
[![Hits](https://hitcount.dev/p/GeyserMC/Floodgate.svg)](https://hitcount.dev/p/GeyserMC/Floodgate)
77

8-
[Download](https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/)
8+
[Download](https://geysermc.org/download/?project=floodgate)
99

1010
Hybrid mode plugin to allow for connections from [Geyser](https://github.com/GeyserMC/Geyser) to join online mode servers.
1111

1212
Geyser is an open collaboration project by [CubeCraft Games](https://cubecraft.net).
1313

14-
See the [Floodgate](https://wiki.geysermc.org/floodgate/) section in the GeyserMC Wiki for more info about what Floodgate is, how you setup Floodgate and known issues/caveats. Additionally, it includes a more in-depth look into how Floodgate works and the Floodgate API.
14+
See the [Floodgate](https://geysermc.org/wiki/floodgate/) section in the GeyserMC Wiki for more info about what Floodgate is, how you setup Floodgate and known issues/caveats. Additionally, it includes a more in-depth look into how Floodgate works and the Floodgate API.

api/src/main/java/org/geysermc/floodgate/api/FloodgateApi.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ static FloodgateApi getInstance() {
9797

9898
boolean sendForm(UUID uuid, FormBuilder<?, ?, ?> formBuilder);
9999

100+
boolean closeForm(UUID uuid);
101+
100102
/**
101103
* @deprecated since Cumulus 1.1 and will be removed when Cumulus 2.0 releases. Please use the
102104
* new form classes instead.

api/src/main/java/org/geysermc/floodgate/api/InstanceHolder.java

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public final class InstanceHolder {
3838
@Getter private static PlayerLink playerLink;
3939
@Getter private static FloodgateEventBus eventBus;
4040

41-
@Getter private static PlatformInjector injector;
42-
@Getter private static PacketHandlers packetHandlers;
43-
@Getter private static HandshakeHandlers handshakeHandlers;
41+
private static PlatformInjector injector;
42+
private static PacketHandlers packetHandlers;
43+
private static HandshakeHandlers handshakeHandlers;
4444
private static UUID storedKey;
4545

4646
public static boolean set(
@@ -68,4 +68,31 @@ public static boolean set(
6868
InstanceHolder.handshakeHandlers = handshakeHandlers;
6969
return true;
7070
}
71+
72+
/**
73+
* @deprecated Injector addons will be removed with the launch of Floodgate 3.0. Please look at
74+
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
75+
*/
76+
@Deprecated
77+
public static PlatformInjector getInjector() {
78+
return InstanceHolder.injector;
79+
}
80+
81+
/**
82+
* @deprecated Packet handlers will be removed with the launch of Floodgate 3.0. Please look at
83+
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
84+
*/
85+
@Deprecated
86+
public static PacketHandlers getPacketHandlers() {
87+
return InstanceHolder.packetHandlers;
88+
}
89+
90+
/**
91+
* @deprecated Handshake handlers will be removed with the launch of Floodgate 3.0. Please look at
92+
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
93+
*/
94+
@Deprecated
95+
public static HandshakeHandlers getHandshakeHandlers() {
96+
return InstanceHolder.handshakeHandlers;
97+
}
7198
}

api/src/main/java/org/geysermc/floodgate/api/handshake/HandshakeData.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@
3131
import org.geysermc.floodgate.util.LinkedPlayer;
3232

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

api/src/main/java/org/geysermc/floodgate/api/handshake/HandshakeHandler.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,8 @@
2626
package org.geysermc.floodgate.api.handshake;
2727

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

api/src/main/java/org/geysermc/floodgate/api/handshake/HandshakeHandlers.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@
2626
package org.geysermc.floodgate.api.handshake;
2727

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

api/src/main/java/org/geysermc/floodgate/api/inject/InjectorAddon.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727

2828
import io.netty.channel.Channel;
2929

30+
/**
31+
* @deprecated Injector addons will be removed with the launch of Floodgate 3.0. Please look at
32+
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
33+
*/
34+
@Deprecated
3035
public interface InjectorAddon {
3136
/**
3237
* Called when injecting a specific channel (every client that is connected to the server has

api/src/main/java/org/geysermc/floodgate/api/inject/PlatformInjector.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@
2626
package org.geysermc.floodgate.api.inject;
2727

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

api/src/main/java/org/geysermc/floodgate/api/packet/PacketHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
import io.netty.channel.ChannelHandlerContext;
2929

3030
/**
31-
* For advanced users only! You shouldn't play with this unless you know what you're doing.
31+
* @deprecated Packet handlers will be removed with the launch of Floodgate 3.0. Please look at
32+
* <a href="https://github.com/GeyserMC/Floodgate/issues/536">#536</a> for additional context.
3233
*/
34+
@Deprecated
3335
public interface PacketHandler {
3436
/**
3537
* Called when a registered packet has been seen.

0 commit comments

Comments
 (0)