Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Add API exposure for platform and platform-specific protocol versions
Dieser Commit ist enthalten in:
Ursprung
3772bc1e0b
Commit
80a59f7478
@ -0,0 +1,12 @@
|
||||
package com.velocitypowered.api.network;
|
||||
|
||||
import com.velocitypowered.api.network.registry.Platform;
|
||||
import java.util.List;
|
||||
|
||||
public interface PlatformVersion {
|
||||
Platform platform();
|
||||
|
||||
int protocolVersion();
|
||||
|
||||
List<String> supportedVersions();
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.velocitypowered.api.network.registry;
|
||||
|
||||
public interface Platform {
|
||||
Platform JAVA = new Platform() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Java Edition";
|
||||
}
|
||||
};
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.velocitypowered.api.network.registry;
|
||||
|
||||
import com.velocitypowered.api.network.PlatformVersion;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public interface ProtocolVersionRegistry {
|
||||
@Nullable PlatformVersion lookup(Platform platform, int version);
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren