WIP 1.20.3

This commit is contained in:
Gero
2023-11-22 10:17:52 +01:00
committed by Shane Freeder
parent a6d90105ec
commit 814b53f12c
25 changed files with 406 additions and 321 deletions

View File

@@ -63,7 +63,8 @@ public enum ProtocolVersion {
MINECRAFT_1_19_3(761, "1.19.3"),
MINECRAFT_1_19_4(762, "1.19.4"),
MINECRAFT_1_20(763, "1.20", "1.20.1"),
MINECRAFT_1_20_2(764, "1.20.2");
MINECRAFT_1_20_2(764, "1.20.2"),
MINECRAFT_1_20_3(765, "1.20.3");
private static final int SNAPSHOT_BIT = 30;

View File

@@ -19,6 +19,8 @@ import com.velocitypowered.api.proxy.player.TabList;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import com.velocitypowered.api.util.GameProfile;
import com.velocitypowered.api.util.ModInfo;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
@@ -236,6 +238,7 @@ public interface Player extends
* @return the applied resource pack or null if none.
*/
@Nullable
@Deprecated
ResourcePackInfo getAppliedResourcePack();
/**
@@ -246,8 +249,26 @@ public interface Player extends
* @return the pending resource pack or null if none
*/
@Nullable
@Deprecated
ResourcePackInfo getPendingResourcePack();
/**
* Gets the {@link ResourcePackInfo} of the currently applied
* resource-packs.
*
* @return collection of the applied resource packs.
*/
Collection<ResourcePackInfo> getAppliedResourcePacks();
/**
* Gets the {@link ResourcePackInfo} of the resource packs
* the user is currently downloading or is currently
* prompted to install.
*
* @return collection of the pending resource packs
*/
Collection<ResourcePackInfo> getPendingResourcePacks();
/**
* <strong>Note that this method does not send a plugin message to the server the player
* is connected to.</strong> You should only use this method if you are trying to communicate

View File

@@ -10,11 +10,20 @@ package com.velocitypowered.api.proxy.player;
import net.kyori.adventure.text.Component;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.UUID;
/**
* Represents the information for a resource pack to apply that can be sent to the client.
*/
public interface ResourcePackInfo {
/**
* Gets the id of this resource-pack.
*
* @return the id of the resource-pack
*/
UUID getId();
/**
* Gets the link the resource-pack can be found at.
*
@@ -96,6 +105,13 @@ public interface ResourcePackInfo {
*/
interface Builder {
/**
* Sets the id of the resource pack.
*
* @param id the id the resource-pack
*/
Builder setId(UUID id);
/**
* Sets the resource-pack as required to play on the network.
* This feature was introduced in 1.17.