Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Build

on: [push]
on:
workflow_dispatch:
push:
paths-ignore:
- 'LICENSE'
- 'README.md'
- '.gitignore'
- '.idea/copyright/*.xml'
- '.github/workflows/pullrequest.yml'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![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)
[![Discord](https://img.shields.io/discord/613163671870242838.svg?color=%237289da&label=discord)](http://discord.geysermc.org/)
[![HitCount](https://hits.dwyl.com/GeyserMC/Floodgate.svg)](http://hits.dwyl.com/GeyserMC/Floodgate)
[![Hits](https://hitcount.dev/p/GeyserMC/Floodgate.svg)](https://hitcount.dev/p/GeyserMC/Floodgate)

[Download](https://geysermc.org/download/?project=floodgate)

Expand Down
2 changes: 1 addition & 1 deletion build-logic/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object Versions {
const val cloudCore = "2.0.0-rc.2"
const val bstatsVersion = "3.0.2"

const val javaWebsocketVersion = "1.5.2"
const val javaWebsocketVersion = "1.6.0"

const val checkerQual = "3.19.0"
}
19 changes: 16 additions & 3 deletions spigot/src/main/java/org/geysermc/floodgate/util/ClassNames.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,23 @@ public class ClassNames {

PACKET_LISTENER = getFieldOfType(networkManager, packetListenerClass);
} else {
// We get the field by name on 1.20.2+ as there are now multiple fields of this type in network manager
// We get the field by name on 1.20.2+ as there are now multiple fields of this type in network manager.
// We need the second one, the packetListener. Not disconnectListener

// PacketListener packetListener of NetworkManager
PACKET_LISTENER = getField(networkManager, "packetListener", "q");
// Mojang mapping variant
Field packetListener = getField(networkManager, "packetListener");

if (packetListener == null) {
// We're most likely on Spigot between 1.20.2 and 26.1 (because obfuscated names are dropped after)
packetListener = getField(networkManager, "q");

if (Boolean.TYPE.equals(packetListener.getType())) {
// In the last version of obfuscated field names of Spigot (1.21.11), the name changed :/
packetListener = getField(networkManager, "n");
}
}

PACKET_LISTENER = packetListener;
makeAccessible(PACKET_LISTENER);
}
checkNotNull(PACKET_LISTENER, "Packet listener");
Expand Down
Loading