Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 07:40:10 +01:00
API: Expose a GeyserConnection's protocol version (#5083)
* Add protocolVersion() to GeyserConnection * specify which protocol
Dieser Commit ist enthalten in:
Ursprung
264a914d41
Commit
d94c6ffcb6
@ -70,6 +70,11 @@ public interface GeyserConnection extends Connection, CommandSource {
|
||||
*/
|
||||
void closeForm();
|
||||
|
||||
/**
|
||||
* Gets the Bedrock protocol version of the player.
|
||||
*/
|
||||
int protocolVersion();
|
||||
|
||||
/**
|
||||
* @param javaId the Java entity ID to look up.
|
||||
* @return a {@link GeyserEntity} if present in this connection's entity tracker.
|
||||
|
@ -2229,6 +2229,11 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
||||
return (int) Math.floor(rakSessionCodec.getPing());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int protocolVersion() {
|
||||
return upstream.getProtocolVersion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeForm() {
|
||||
if (!GameProtocol.isPre1_21_2(this)) {
|
||||
|
@ -8,5 +8,5 @@ org.gradle.vfs.watch=false
|
||||
|
||||
group=org.geysermc
|
||||
id=geyser
|
||||
version=2.4.3-SNAPSHOT
|
||||
version=2.4.4-SNAPSHOT
|
||||
description=Allows for players from Minecraft: Bedrock Edition to join Minecraft: Java Edition servers.
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren