mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
12
paper-api/src/main/java/org/bukkit/entity/Breeze.java
Normal file
12
paper-api/src/main/java/org/bukkit/entity/Breeze.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Breeze. Whoosh!
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface Breeze extends Monster {
|
||||
}
|
@@ -6,6 +6,7 @@ import java.util.Map;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Translatable;
|
||||
import org.bukkit.World;
|
||||
@@ -18,6 +19,7 @@ import org.bukkit.entity.minecart.SpawnerMinecart;
|
||||
import org.bukkit.entity.minecart.StorageMinecart;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -284,6 +286,12 @@ public enum EntityType implements Keyed, Translatable {
|
||||
ITEM_DISPLAY("item_display", ItemDisplay.class, -1),
|
||||
SNIFFER("sniffer", Sniffer.class, -1),
|
||||
TEXT_DISPLAY("text_display", TextDisplay.class, -1),
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
BREEZE("breeze", Breeze.class, -1),
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
WIND_CHARGE("wind_charge", WindCharge.class, -1),
|
||||
/**
|
||||
* A fishing line and bobber.
|
||||
*/
|
||||
|
@@ -7,6 +7,7 @@ import java.time.Instant;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.BanEntry;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Effect;
|
||||
@@ -1525,6 +1526,53 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void setResourcePack(@NotNull String url, @Nullable byte[] hash, @Nullable String prompt, boolean force);
|
||||
|
||||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
* The player's client will download the new resource pack asynchronously
|
||||
* in the background, and will automatically switch to it once the
|
||||
* download is complete. If the client has downloaded and cached a
|
||||
* resource pack with the same hash in the past it will not download but
|
||||
* directly apply the cached pack. If the hash is null and the client has
|
||||
* downloaded and cached the same resource pack in the past, it will
|
||||
* perform a file size check against the response content to determine if
|
||||
* the resource pack has changed and needs to be downloaded again. When
|
||||
* this request is sent for the very first time from a given server, the
|
||||
* client will first display a confirmation GUI to the player before
|
||||
* proceeding with the download.
|
||||
* <p>
|
||||
* Notes:
|
||||
* <ul>
|
||||
* <li>Players can disable server resources on their client, in which
|
||||
* case this method will have no affect on them. Use the
|
||||
* {@link PlayerResourcePackStatusEvent} to figure out whether or not
|
||||
* the player loaded the pack!
|
||||
* <li>There is no concept of resetting resource packs back to default
|
||||
* within Minecraft, so players will have to relog to do so or you
|
||||
* have to send an empty pack.
|
||||
* <li>The request is sent with empty string as the hash when the hash is
|
||||
* not provided. This might result in newer versions not loading the
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
* @param id Unique resource pack ID.
|
||||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
* @param hash The sha1 hash sum of the resource pack file which is used
|
||||
* to apply a cached version of the pack directly without downloading
|
||||
* if it is available. Hast to be 20 bytes long!
|
||||
* @param prompt The optional custom prompt message to be shown to client.
|
||||
* @param force If true, the client will be disconnected from the server
|
||||
* when it declines to use the resource pack.
|
||||
* @throws IllegalArgumentException Thrown if the URL is null.
|
||||
* @throws IllegalArgumentException Thrown if the URL is too long. The
|
||||
* length restriction is an implementation specific arbitrary value.
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
public void setResourcePack(@NotNull UUID id, @NotNull String url, @Nullable byte[] hash, @Nullable String prompt, boolean force);
|
||||
|
||||
/**
|
||||
* Gets the Scoreboard displayed to this player
|
||||
*
|
||||
|
12
paper-api/src/main/java/org/bukkit/entity/WindCharge.java
Normal file
12
paper-api/src/main/java/org/bukkit/entity/WindCharge.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
/**
|
||||
* Represents a Wind Charge.
|
||||
*/
|
||||
@MinecraftExperimental
|
||||
@ApiStatus.Experimental
|
||||
public interface WindCharge extends Fireball {
|
||||
}
|
Reference in New Issue
Block a user