Skip to content

Commit

Permalink
1.20.2 velocity (#1)
Browse files Browse the repository at this point in the history
* 1.20.2 Velocity

Signed-off-by: Joshua Castle <[email protected]>

* Archive build artifacts

Signed-off-by: Joshua Castle <[email protected]>

* Fix typo in velocity-plugin.json

Signed-off-by: Joshua Castle <[email protected]>

---------

Signed-off-by: Joshua Castle <[email protected]>
  • Loading branch information
Kas-tle authored Sep 23, 2023
1 parent 1149be0 commit 8ee2c95
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ jobs:
arguments: build
cache-read-only: ${{ github.ref_name != 'master' && github.ref_name != 'development' }}

- name: Archive artifacts (Floodgate Bungee)
uses: actions/upload-artifact@v2
if: success()
with:
name: Floodgate Bungee
path: bungee/build/libs/floodgate-bungee.jar

- name: Archive artifacts (Floodgate Spigot)
uses: actions/upload-artifact@v2
if: success()
with:
name: Floodgate Spigot
path: spigot/build/libs/floodgate-spigot.jar

- name: Archive artifacts (Floodgate Velocity)
uses: actions/upload-artifact@v2
if: success()
with:
name: Floodgate Velocity
path: velocity/build/libs/floodgate-velocity.jar

- name: Publish to Maven Repository
if: ${{ github.repository == 'GeyserMC/Floodgate' }}
uses: gradle/gradle-build-action@v2
Expand Down
9 changes: 8 additions & 1 deletion velocity/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
var velocityVersion = "3.1.1"
var velocityVersion = "3.2.0-SNAPSHOT"
var log4jVersion = "2.11.2"
var gsonVersion = "2.8.8"
var guavaVersion = "25.1-jre"

indra {
javaVersions {
// For Velocity API
target(11)
}
}

dependencies {
api(projects.core)
implementation("cloud.commandframework", "cloud-velocity", Versions.cloudVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ public final class VelocityProxyDataHandler extends CommonDataHandler {
SERVER_LOGIN_PACKET = getPrefixedClass("protocol.packet.ServerLogin");
checkNotNull(SERVER_LOGIN_PACKET, "ServerLogin packet class cannot be null");

GET_SESSION_HANDLER = getMethodByName(minecraftConnection, "getSessionHandler", true);

Method sessionHandler = getMethodByName(minecraftConnection, "getSessionHandler", true);
if (sessionHandler == null) {
// We are 1.20.2+
sessionHandler = getMethodByName(minecraftConnection, "getActiveSessionHandler", true);
}
GET_SESSION_HANDLER = sessionHandler;
checkNotNull(GET_SESSION_HANDLER, "getSessionHandler method cannot be null");

INITIAL_LOGIN_SESSION_HANDLER =
Expand Down
2 changes: 1 addition & 1 deletion velocity/src/main/resources/velocity-plugin.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id": "${id}", "name": "${name}", "version": "${version}", "description": "${description}", "url": "$url}", "authors": ["${author}"], "main": "org.geysermc.floodgate.VelocityPlugin"}
{"id": "${id}", "name": "${name}", "version": "${version}", "description": "${description}", "url": "${url}", "authors": ["${author}"], "main": "org.geysermc.floodgate.VelocityPlugin"}

0 comments on commit 8ee2c95

Please sign in to comment.