Skip to content

Commit

Permalink
Merge branch 'Kas-tle-bungee/1.20.2' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeCrafter47 committed Oct 1, 2023
2 parents 230eb63 + e55986e commit a05bead
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build With Gradle

on: [ push, pull_request ]

This comment has been minimized.

Copy link
@Andre601

Andre601 Oct 4, 2023

Contributor

I feel like doing this every time a push is made is overkill... For a pull request? Sure. But a push could be spammy depending on how many individual commits are made.


jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 16
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '16'
cache: 'gradle'

- name: Build with Gradle
run: ./gradlew shadowJar

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

- name: Archive artifacts (Bukkit)
uses: actions/upload-artifact@v2
if: success()
with:
name: BungeeTabListPlus Bukkit Bridge
path: bootstrap-bukkit/build/libs/BungeeTabListPlus_BukkitBridge-*-SNAPSHOT.jar

- name: Archive artifacts (Fabric 1.16.3)
uses: actions/upload-artifact@v2
if: success()
with:
name: BungeeTabListPlus Fabric 1.16.3 Bridge
path: fabric-bridge-1.16.3/build/libs/btlp-fabric-bridge-*-SNAPSHOT.jar

- name: Archive artifacts (Fabric 1.17)
uses: actions/upload-artifact@v2
if: success()
with:
name: BungeeTabListPlus Fabric 1.17 Bridge
path: fabric-bridge-1.17/build/libs/btlp-fabric-bridge-*-SNAPSHOT.jar
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {

ext {
spigotVersion = '1.11-R0.1-SNAPSHOT'
bungeeVersion = '1.19-R0.1-SNAPSHOT'
bungeeVersion = '1.20-R0.2-SNAPSHOT'
spongeVersion = '7.0.0'
dataApiVersion = '1.0.2-SNAPSHOT'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import de.codecrafter47.taboverlay.handler.*;
import it.unimi.dsi.fastutil.objects.*;
import lombok.*;
import net.md_5.bungee.UserConnection;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.protocol.DefinedPacket;
import net.md_5.bungee.protocol.packet.*;
Expand Down Expand Up @@ -181,6 +182,11 @@ private void sendPacket(DefinedPacket packet) {
logVersionMismatch = true;
logger.warning("Cannot correctly update tablist for player " + player.getName() + "\nThe client and server versions do not match. Client >= 1.19.3, server < 1.19.3.\nUse ViaVersion on the spigot server for the best experience.");
}
} else if (player.getPendingConnection().getVersion() >= 764) {
// Ensure that unsafe packets are not sent in the config phase
// Why bungee doesn't expose this via api beyond me...
// https://github.com/SpigotMC/BungeeCord/blob/1ef4d27dbea48a1d47501ad2be0d75e42cc2cc12/proxy/src/main/java/net/md_5/bungee/UserConnection.java#L182-L192
((UserConnection) player).sendPacketQueued(packet);
} else {
player.unsafe().sendPacket(packet);
}
Expand Down

0 comments on commit a05bead

Please sign in to comment.