Snapshot 20w45a

This commit is contained in:
Five (Xer)
2020-11-04 22:35:27 +01:00
committed by FivePB
parent 06ecab2627
commit 7f0964155c
4 changed files with 40 additions and 2 deletions

View File

@@ -53,7 +53,8 @@ public enum ProtocolVersion {
MINECRAFT_1_16_1(736, "1.16.1"),
MINECRAFT_1_16_2(751, "1.16.2"),
MINECRAFT_1_16_3(753, "1.16.3"),
MINECRAFT_1_16_4(754, "1.16.4", "1.16.5");
MINECRAFT_1_16_4(754, "1.16.4", "1.16.5"),
MINECRAFT_1_17(754, 5, "1.17"); // Note: this probably isnt intentional
private static final int SNAPSHOT_BIT = 30;

View File

@@ -239,4 +239,19 @@ public interface Player extends CommandSource, Identified, InboundConnection,
*/
@Override
boolean sendPluginMessage(ChannelIdentifier identifier, byte[] data);
/**
* Sends the specified resource pack from {@code url} to the user, using the specified 20-byte
* SHA-1 hash. To monitor the status of the sent resource pack, subscribe to
* {@link PlayerResourcePackStatusEvent}.
* In 1.17 and newer you can additionally specify
* whether the resource pack is required or not. Setting this for an older client will have
* no effect.
*
* @param url the URL for the resource pack
* @param hash the SHA-1 hash value for the resource pack
* @param isRequired flag to set the resource pack as required in 1.17+
*/
void sendResourcePack(String url, byte[] hash, boolean isRequired);
}