Skip to content

Conversation

@paulzhng
Copy link
Contributor

@paulzhng paulzhng commented Feb 27, 2021

This PR adds support for Geyser, Fabric and Paper without ProtocolLib and removes the illegal access message in some cases.

Geyser

Geyser support only targets Floodgate 2.0 (still in beta).
Huge, huge thanks to the whole GeyserMC team and specifically Tim203 for their incredible support on this journey.

Native Paper

Native paper support depends on a PR only merged recently so it only supports Paper 1.16 build #503 or higher.

Illegal Access

The illegal access message is removed in cases where it isn't needed. The final field is now queried lazily (when it's needed).

Fabric

see #40

@paulzhng paulzhng mentioned this pull request Mar 9, 2021
@paulzhng
Copy link
Contributor Author

paulzhng commented Mar 9, 2021

Pending until Floodgate 2.0 is released

@Prof-Bloodstone
Copy link

Hey,
I know this will be fixed when you officially release it, but for other folks who might decide to run this before it's released (for example because of dropped dependency on ProtocolLib on Paper):.

  1. The paper-api dependency version doesn't exist anymore, should just pin yourself to latest snapshot.
  2. You are missing repositories for floodgate - they are available at https://repo.opencollab.dev/maven-{releases,snapshots}
  3. The floodgate dependency has wrong group and package - should be org.geysermc.floodgate:spigot

Patch which takes it all together and makes it compileable on current floodgate snapshot:

diff --git a/build.gradle b/build.gradle
index be900c4..423b3ac 100644
--- a/build.gradle
+++ b/build.gradle
@@ -44,6 +44,12 @@ repositories {
     maven {
         url = 'https://maven.fabricmc.net/'
     }
+    maven {
+        url = 'https://repo.opencollab.dev/maven-snapshots'
+    }
+    maven {
+        url = 'https://repo.opencollab.dev/maven-releases'
+    }
     flatDir {
         dirs '/libs'
     }
@@ -55,7 +61,7 @@ dependencies {
     compileOnly group: 'com.comphenix.protocol', name: 'ProtocolLib', version: '4.4.0'

     // Paper
-    compileOnly group: 'com.destroystokyo.paper', name: 'paper-api', version: '1.16.5-R0.1-20210227.144841-85'
+    compileOnly group: 'com.destroystokyo.paper', name: 'paper-api', version: '1.16.5-R0.1-SNAPSHOT'

     // BungeeCord
     compileOnly group: 'net.md-5', name: 'bungeecord-api', version: '1.14-SNAPSHOT'
@@ -72,7 +78,7 @@ dependencies {
     testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.0-M1'
     testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.0-M1'

-    compileOnly 'org.geyser:floodgate-spigot:2.0'
+    compileOnly 'org.geysermc.floodgate:spigot:2.0-SNAPSHOT'
 }

 test {
@@ -167,4 +173,4 @@ void updateJson() {
     }
 }

-build.dependsOn updateVersion
\ No newline at end of file
+build.dependsOn updateVersion


return new ConfigData(onlyAllowProxyConnections, debugMode);
} catch (Exception e) {
throw new TCPShieldInitializationException("Couldn't load config in config/tclshield.yml!");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo tclshield - could probably use path extracted from configLocation

@Camotoy
Copy link

Camotoy commented Jul 31, 2021

Floodgate can just reference the API module api; using the Spigot dependency is unnecessary here.

@DylanKeir DylanKeir requested review from DylanKeir and removed request for a user August 27, 2021 06:23
@DylanKeir DylanKeir self-assigned this Aug 27, 2021
@TCPShield TCPShield deleted a comment from DylanKeir Aug 27, 2021
@DylanKeir DylanKeir closed this Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants