mirror of
https://github.com/PaperMC/Paper.git
synced 2025-05-19 05:30:23 -07:00
Update a whole lot of deprecated annotations
This commit is contained in:
parent
bb1beda67b
commit
9f00461456
@ -5,6 +5,7 @@ import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Pattern;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -126,6 +127,7 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
|
||||
* @deprecated should never be used by plugins, for internal use only!!
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
public static NamespacedTag randomKey() {
|
||||
return new NamespacedTag(BUKKIT, UUID.randomUUID().toString());
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.destroystokyo.paper.event.entity;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import java.util.List;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.SkeletonHorse;
|
||||
@ -21,12 +20,6 @@ public class SkeletonHorseTrapEvent extends EntityEvent implements Cancellable {
|
||||
private final List<HumanEntity> eligibleHumans;
|
||||
private boolean cancelled;
|
||||
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
public SkeletonHorseTrapEvent(final SkeletonHorse horse) {
|
||||
this(horse, ImmutableList.of());
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public SkeletonHorseTrapEvent(final SkeletonHorse horse, final List<HumanEntity> eligibleHumans) {
|
||||
super(horse);
|
||||
|
@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* @deprecated Not used
|
||||
*/
|
||||
@Deprecated(since = "1.16.4")
|
||||
@Deprecated(since = "1.16.4", forRemoval = true)
|
||||
public class IllegalPacketEvent extends PlayerEvent {
|
||||
|
||||
private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
|
@ -30,20 +30,6 @@ public class PlayerClientOptionsChangeEvent extends PlayerEvent {
|
||||
private final boolean textFilteringEnabled;
|
||||
private final ParticleVisibility particleVisibility;
|
||||
|
||||
@Deprecated
|
||||
public PlayerClientOptionsChangeEvent(final Player player, final String locale, final int viewDistance, final ChatVisibility chatVisibility, final boolean chatColors, final SkinParts skinParts, final MainHand mainHand) {
|
||||
super(player);
|
||||
this.locale = locale;
|
||||
this.viewDistance = viewDistance;
|
||||
this.chatVisibility = chatVisibility;
|
||||
this.chatColors = chatColors;
|
||||
this.skinparts = skinParts;
|
||||
this.mainHand = mainHand;
|
||||
this.allowsServerListings = false;
|
||||
this.textFilteringEnabled = false;
|
||||
this.particleVisibility = ParticleVisibility.ALL;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerClientOptionsChangeEvent(final Player player, final Map<ClientOption<?>, ?> options) {
|
||||
super(player);
|
||||
|
@ -50,12 +50,6 @@ public class ProfileWhitelistVerifyEvent extends Event {
|
||||
private boolean whitelisted;
|
||||
private @Nullable Component kickMessage;
|
||||
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
public ProfileWhitelistVerifyEvent(final PlayerProfile profile, final boolean whitelistEnabled, final boolean whitelisted, final boolean isOp, final @Nullable String kickMessage) {
|
||||
this(profile, whitelistEnabled, whitelisted, isOp, kickMessage == null ? null : LegacyComponentSerializer.legacySection().deserialize(kickMessage));
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public ProfileWhitelistVerifyEvent(final PlayerProfile profile, final boolean whitelistEnabled, final boolean whitelisted, final boolean isOp, final @Nullable Component kickMessage) {
|
||||
this.profile = profile;
|
||||
|
@ -55,18 +55,6 @@ public class PaperServerListPingEvent extends ServerListPingEvent implements Can
|
||||
private boolean originalPlayerCount = true;
|
||||
private Object[] players;
|
||||
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull String motd, int numPlayers, int maxPlayers,
|
||||
@NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
|
||||
super("", client.getAddress().getAddress(), motd, numPlayers, maxPlayers);
|
||||
this.client = client;
|
||||
this.numPlayers = numPlayers;
|
||||
this.version = version;
|
||||
this.protocolVersion = protocolVersion;
|
||||
setServerIcon(favicon);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PaperServerListPingEvent(@NotNull StatusClient client, @NotNull net.kyori.adventure.text.Component motd, int numPlayers, int maxPlayers,
|
||||
@NotNull String version, int protocolVersion, @Nullable CachedServerIcon favicon) {
|
||||
|
@ -109,9 +109,9 @@ public interface Art extends OldEnum<Art>, Keyed {
|
||||
* Get the ID of this painting.
|
||||
*
|
||||
* @return The ID of this painting
|
||||
* @deprecated Magic value
|
||||
* @deprecated Magic value that is based on inconsistent, data-driven registry
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
int getId();
|
||||
|
||||
// Paper start - deprecate getKey
|
||||
@ -162,9 +162,9 @@ public interface Art extends OldEnum<Art>, Keyed {
|
||||
*
|
||||
* @param id The ID
|
||||
* @return The painting
|
||||
* @deprecated Magic value
|
||||
* @deprecated Magic value that is based on inconsistent, data-driven registry
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
@Nullable
|
||||
static Art getById(int id) {
|
||||
for (Art art : Registry.ART) {
|
||||
|
@ -930,7 +930,6 @@ public final class Bukkit {
|
||||
* @param id the id of the map to get
|
||||
* @return a map view if it exists, or null otherwise
|
||||
*/
|
||||
// @Deprecated(since = "1.6.2") // Paper - Not a magic value
|
||||
@Nullable
|
||||
public static MapView getMap(int id) {
|
||||
return server.getMap(id);
|
||||
@ -1392,7 +1391,7 @@ public final class Bukkit {
|
||||
* @return true if the server should send a preview, false otherwise
|
||||
* @deprecated chat previews have been removed
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
public static boolean shouldSendChatPreviews() {
|
||||
return server.shouldSendChatPreviews();
|
||||
}
|
||||
@ -1515,7 +1514,6 @@ public final class Bukkit {
|
||||
* @return an offline player
|
||||
* @see #getOfflinePlayer(java.util.UUID)
|
||||
*/
|
||||
// @Deprecated(since = "1.7.5") // Paper
|
||||
@NotNull
|
||||
public static OfflinePlayer getOfflinePlayer(@NotNull String name) {
|
||||
return server.getOfflinePlayer(name);
|
||||
|
@ -65,7 +65,7 @@ public interface ChunkSnapshot {
|
||||
* @return 0-15
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
int getData(int x, int y, int z);
|
||||
|
||||
/**
|
||||
|
@ -27,70 +27,70 @@ public enum Effect {
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_WOODEN_DOOR_OPEN
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
DOOR_TOGGLE(1006, Type.SOUND),
|
||||
/**
|
||||
* Sound of a door opening.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_IRON_DOOR_OPEN
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
IRON_DOOR_TOGGLE(1005, Type.SOUND),
|
||||
/**
|
||||
* Sound of a trapdoor opening.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_WOODEN_TRAPDOOR_OPEN
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
TRAPDOOR_TOGGLE(1007, Type.SOUND),
|
||||
/**
|
||||
* Sound of a door opening.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_IRON_TRAPDOOR_OPEN
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
IRON_TRAPDOOR_TOGGLE(1037, Type.SOUND),
|
||||
/**
|
||||
* Sound of a door opening.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_FENCE_GATE_OPEN
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
FENCE_GATE_TOGGLE(1008, Type.SOUND),
|
||||
/**
|
||||
* Sound of a door closing.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_WOODEN_DOOR_CLOSE
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
DOOR_CLOSE(1012, Type.SOUND),
|
||||
/**
|
||||
* Sound of a door closing.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_IRON_DOOR_CLOSE
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
IRON_DOOR_CLOSE(1011, Type.SOUND),
|
||||
/**
|
||||
* Sound of a trapdoor closing.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_WOODEN_TRAPDOOR_CLOSE
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
TRAPDOOR_CLOSE(1013, Type.SOUND),
|
||||
/**
|
||||
* Sound of a door closing.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_IRON_TRAPDOOR_CLOSE
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
IRON_TRAPDOOR_CLOSE(1036, Type.SOUND),
|
||||
/**
|
||||
* Sound of a door closing.
|
||||
* @deprecated no longer exists
|
||||
* @see Sound#BLOCK_FENCE_GATE_CLOSE
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
FENCE_GATE_CLOSE(1014, Type.SOUND),
|
||||
/**
|
||||
* Sound of fire being extinguished.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1231,8 +1231,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @return true if the server should send a preview, false otherwise
|
||||
* @deprecated chat previews have been removed
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
public boolean shouldSendChatPreviews();
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
default boolean shouldSendChatPreviews() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether the server only allow players with Mojang-signed public key
|
||||
|
@ -494,7 +494,6 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @return Whether the chunk was actually refreshed
|
||||
*
|
||||
*/
|
||||
// @Deprecated(since = "1.8") // Paper
|
||||
public boolean refreshChunk(int x, int z);
|
||||
|
||||
/**
|
||||
@ -2478,7 +2477,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @deprecated Use {@link #spawn(Location, Class, Consumer)} (or a variation thereof) in combination with {@link FallingBlock#setBlockData(BlockData)}
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated(since = "1.20.2") // Paper
|
||||
@Deprecated(since = "1.20.2", forRemoval = true)
|
||||
public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull MaterialData data) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@ -2513,7 +2512,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* Material} are null or {@link Material} is not a block
|
||||
* @deprecated Magic value. Use {@link #spawn(Location, Class, Consumer)} (or a variation thereof) in combination with {@link FallingBlock#setBlockData(BlockData)}
|
||||
*/
|
||||
@Deprecated(since = "1.7.5")
|
||||
@Deprecated(since = "1.7.5", forRemoval = true)
|
||||
@NotNull
|
||||
public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull Material material, byte data) throws IllegalArgumentException;
|
||||
|
||||
|
@ -40,7 +40,7 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||
* @return block specific metadata
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
byte getData();
|
||||
|
||||
/**
|
||||
|
@ -225,14 +225,14 @@ public interface BlockState extends Metadatable {
|
||||
* @return The data as a raw byte.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
public byte getRawData();
|
||||
|
||||
/**
|
||||
* @param data The new data value for the block.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
public void setRawData(byte data);
|
||||
|
||||
/**
|
||||
|
@ -155,7 +155,7 @@ public interface Skull extends TileState {
|
||||
* @return the type of skull
|
||||
* @deprecated check {@link Material} instead
|
||||
*/
|
||||
@Deprecated(since = "1.13")
|
||||
@Deprecated(since = "1.13", forRemoval = true)
|
||||
@NotNull
|
||||
public SkullType getSkullType();
|
||||
|
||||
@ -165,7 +165,7 @@ public interface Skull extends TileState {
|
||||
* @param skullType the type of skull
|
||||
* @deprecated check {@link Material} instead
|
||||
*/
|
||||
@Deprecated(since = "1.13")
|
||||
@Deprecated(since = "1.13", forRemoval = true)
|
||||
@Contract("_ -> fail")
|
||||
public void setSkullType(SkullType skullType);
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
* @deprecated enchantments are badly named, use {@link #getKey()}.
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated(since = "1.13")
|
||||
@Deprecated(since = "1.13", forRemoval = true)
|
||||
public abstract String getName();
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@ public enum EnchantmentTarget {
|
||||
*
|
||||
* @deprecated this target no longer exists in Vanilla
|
||||
*/
|
||||
@Deprecated(since = "1.16.1")
|
||||
@Deprecated(since = "1.16.1", forRemoval = true)
|
||||
ALL {
|
||||
@Override
|
||||
public boolean includes(@NotNull Material item) {
|
||||
|
@ -6,7 +6,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* A simple wrapper for ease of selecting {@link Enchantment}s
|
||||
* @deprecated only for backwards compatibility, EnchantmentWrapper is no longer used.
|
||||
*/
|
||||
@Deprecated(since = "1.20.3")
|
||||
@Deprecated(since = "1.20.3", forRemoval = true)
|
||||
public abstract class EnchantmentWrapper extends Enchantment {
|
||||
protected EnchantmentWrapper() {
|
||||
}
|
||||
|
@ -20,9 +20,9 @@ public interface AbstractArrow extends Projectile {
|
||||
*
|
||||
* @return the knockback strength value
|
||||
* @see #getWeapon()
|
||||
* @deprecated a function of the firing weapon
|
||||
* @deprecated moved to being a function of the firing weapon, always returns 0 here
|
||||
*/
|
||||
@Deprecated(since = "1.21")
|
||||
@Deprecated(since = "1.21", forRemoval = true)
|
||||
public int getKnockbackStrength();
|
||||
|
||||
/**
|
||||
@ -30,9 +30,9 @@ public interface AbstractArrow extends Projectile {
|
||||
*
|
||||
* @param knockbackStrength the knockback strength value
|
||||
* @see #setWeapon(org.bukkit.inventory.ItemStack)
|
||||
* @deprecated a function of the firing weapon
|
||||
* @deprecated moved to being a function of the firing weapon, does nothing here
|
||||
*/
|
||||
@Deprecated(since = "1.21")
|
||||
@Deprecated(since = "1.21", forRemoval = true)
|
||||
public void setKnockbackStrength(int knockbackStrength);
|
||||
|
||||
/**
|
||||
@ -145,9 +145,9 @@ public interface AbstractArrow extends Projectile {
|
||||
*
|
||||
* @param shotFromCrossbow if shot from a crossbow
|
||||
* @see #setWeapon(org.bukkit.inventory.ItemStack)
|
||||
* @deprecated a function of the firing weapon instead
|
||||
* @deprecated a function of the firing weapon instead, this method does nothing
|
||||
*/
|
||||
@Deprecated(since = "1.21")
|
||||
@Deprecated(since = "1.21", forRemoval = true)
|
||||
public void setShotFromCrossbow(boolean shotFromCrossbow);
|
||||
|
||||
/**
|
||||
|
@ -20,7 +20,7 @@ public interface AbstractHorse extends Vehicle, InventoryHolder, Tameable {
|
||||
* @return a {@link Horse.Variant} representing the horse's variant
|
||||
* @deprecated different variants are different classes
|
||||
*/
|
||||
@Deprecated(since = "1.11")
|
||||
@Deprecated(since = "1.11", forRemoval = true)
|
||||
@NotNull
|
||||
public Horse.Variant getVariant();
|
||||
|
||||
@ -28,7 +28,7 @@ public interface AbstractHorse extends Vehicle, InventoryHolder, Tameable {
|
||||
* @param variant variant
|
||||
* @deprecated you are required to spawn a different entity
|
||||
*/
|
||||
@Deprecated(since = "1.11")
|
||||
@Deprecated(since = "1.11", forRemoval = true)
|
||||
@Contract("_ -> fail")
|
||||
public void setVariant(Horse.Variant variant);
|
||||
|
||||
@ -108,7 +108,7 @@ public interface AbstractHorse extends Vehicle, InventoryHolder, Tameable {
|
||||
* @return true if eating hay
|
||||
* @deprecated use {@link #isEatingGrass()}, this name is incorrect
|
||||
*/
|
||||
@Deprecated // Paper - Horse API
|
||||
@Deprecated(forRemoval = true)
|
||||
boolean isEatingHaystack();
|
||||
|
||||
/**
|
||||
@ -117,7 +117,7 @@ public interface AbstractHorse extends Vehicle, InventoryHolder, Tameable {
|
||||
* @param eatingHaystack new hay grazing status
|
||||
* @deprecated use {@link #setEatingGrass(boolean)}, this name is incorrect
|
||||
*/
|
||||
@Deprecated // Paper - Horse API
|
||||
@Deprecated(forRemoval = true)
|
||||
void setEatingHaystack(boolean eatingHaystack);
|
||||
|
||||
@NotNull
|
||||
|
@ -21,7 +21,7 @@ public interface AbstractSkeleton extends Monster, com.destroystokyo.paper.entit
|
||||
* @return Current type
|
||||
* @deprecated should check what class instance this is.
|
||||
*/
|
||||
@Deprecated(since = "1.17")
|
||||
@Deprecated(since = "1.17", forRemoval = true)
|
||||
@NotNull
|
||||
public Skeleton.SkeletonType getSkeletonType();
|
||||
|
||||
@ -29,7 +29,7 @@ public interface AbstractSkeleton extends Monster, com.destroystokyo.paper.entit
|
||||
* @param type type
|
||||
* @deprecated Must spawn a new subtype variant
|
||||
*/
|
||||
@Deprecated(since = "1.17")
|
||||
@Deprecated(since = "1.17", forRemoval = true)
|
||||
@Contract("_ -> fail")
|
||||
public void setSkeletonType(Skeleton.SkeletonType type);
|
||||
|
||||
|
@ -152,7 +152,7 @@ public interface AreaEffectCloud extends Entity {
|
||||
* @param data PotionData to set the base potion state to
|
||||
* @deprecated Upgraded / extended potions are now their own {@link PotionType} use {@link #setBasePotionType} instead.
|
||||
*/
|
||||
@Deprecated(since = "1.20.6")
|
||||
@Deprecated(since = "1.20.6", forRemoval = true)
|
||||
void setBasePotionData(@Nullable PotionData data);
|
||||
|
||||
/**
|
||||
@ -162,7 +162,7 @@ public interface AreaEffectCloud extends Entity {
|
||||
* @deprecated Upgraded / extended potions are now their own {@link PotionType} use {@link #getBasePotionType()} instead.
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated(since = "1.20.6")
|
||||
@Deprecated(since = "1.20.6", forRemoval = true)
|
||||
PotionData getBasePotionData();
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ public interface Arrow extends AbstractArrow {
|
||||
* @param data PotionData to set the base potion state to
|
||||
* @deprecated Upgraded / extended potions are now their own {@link PotionType} use {@link #setBasePotionType} instead.
|
||||
*/
|
||||
@Deprecated(since = "1.20.6")
|
||||
@Deprecated(since = "1.20.6", forRemoval = true)
|
||||
void setBasePotionData(@Nullable PotionData data);
|
||||
|
||||
/**
|
||||
@ -27,7 +27,7 @@ public interface Arrow extends AbstractArrow {
|
||||
* @deprecated Upgraded / extended potions are now their own {@link PotionType} use {@link #getBasePotionType()} instead.
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated(since = "1.20.6")
|
||||
@Deprecated(since = "1.20.6", forRemoval = true)
|
||||
PotionData getBasePotionData();
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ public interface Boat extends Vehicle, io.papermc.paper.entity.Leashable { // Pa
|
||||
* @return the wood type
|
||||
* @deprecated deprecated in favor of {@link #getBoatType()}
|
||||
*/
|
||||
@Deprecated(since = "1.19")
|
||||
@Deprecated(since = "1.19", forRemoval = true)
|
||||
@NotNull
|
||||
TreeSpecies getWoodType();
|
||||
|
||||
@ -25,7 +25,7 @@ public interface Boat extends Vehicle, io.papermc.paper.entity.Leashable { // Pa
|
||||
* @param species the new wood type
|
||||
* @deprecated deprecated in favor of {@link #setBoatType(Type)}
|
||||
*/
|
||||
@Deprecated(since = "1.19")
|
||||
@Deprecated(since = "1.19", forRemoval = true)
|
||||
void setWoodType(@NotNull TreeSpecies species);
|
||||
|
||||
/**
|
||||
|
@ -10,7 +10,7 @@ public interface Endermite extends Monster {
|
||||
* @return player spawned status
|
||||
* @deprecated this functionality no longer exists
|
||||
*/
|
||||
@Deprecated(since = "1.17")
|
||||
@Deprecated(since = "1.17", forRemoval = true)
|
||||
boolean isPlayerSpawned();
|
||||
|
||||
/**
|
||||
@ -21,7 +21,7 @@ public interface Endermite extends Monster {
|
||||
* @param playerSpawned player spawned status
|
||||
* @deprecated this functionality no longer exists
|
||||
*/
|
||||
@Deprecated(since = "1.17")
|
||||
@Deprecated(since = "1.17", forRemoval = true)
|
||||
void setPlayerSpawned(boolean playerSpawned);
|
||||
// Paper start
|
||||
/**
|
||||
|
@ -407,7 +407,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
|
||||
* @return the raw type id
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
public short getTypeId() {
|
||||
return typeId;
|
||||
}
|
||||
@ -436,7 +436,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
|
||||
* @return the matching entity type or null
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
@Nullable
|
||||
public static EntityType fromId(int id) {
|
||||
if (id > Short.MAX_VALUE) {
|
||||
|
@ -208,7 +208,7 @@ public interface FishHook extends Projectile {
|
||||
* @return chance the bite chance
|
||||
* @deprecated has no effect in newer Minecraft versions
|
||||
*/
|
||||
@Deprecated(since = "1.9.2")
|
||||
@Deprecated(since = "1.9.2", forRemoval = true)
|
||||
public double getBiteChance();
|
||||
|
||||
/**
|
||||
@ -222,7 +222,7 @@ public interface FishHook extends Projectile {
|
||||
* and 1
|
||||
* @deprecated has no effect in newer Minecraft versions
|
||||
*/
|
||||
@Deprecated(since = "1.9.2")
|
||||
@Deprecated(since = "1.9.2", forRemoval = true)
|
||||
public void setBiteChance(double chance) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
|
@ -154,14 +154,14 @@ public interface Horse extends AbstractHorse {
|
||||
* @return carrying chest status
|
||||
* @deprecated see {@link ChestedHorse}
|
||||
*/
|
||||
@Deprecated(since = "1.11")
|
||||
@Deprecated(since = "1.11", forRemoval = true)
|
||||
public boolean isCarryingChest();
|
||||
|
||||
/**
|
||||
* @param chest chest
|
||||
* @deprecated see {@link ChestedHorse}
|
||||
*/
|
||||
@Deprecated(since = "1.11")
|
||||
@Deprecated(since = "1.11", forRemoval = true)
|
||||
public void setCarryingChest(boolean chest);
|
||||
|
||||
@NotNull
|
||||
|
@ -91,7 +91,7 @@ public interface LightningStrike extends Entity {
|
||||
/**
|
||||
* @deprecated Unsupported api
|
||||
*/
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public class Spigot extends Entity.Spigot {
|
||||
|
||||
/**
|
||||
@ -100,7 +100,7 @@ public interface LightningStrike extends Entity {
|
||||
* @return whether the strike is silent.
|
||||
* @deprecated sound is now client side and cannot be removed
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
@Deprecated(since = "1.20.4", forRemoval = true)
|
||||
public boolean isSilent() {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@ -111,7 +111,7 @@ public interface LightningStrike extends Entity {
|
||||
*/
|
||||
@NotNull
|
||||
@Override
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
||||
|
@ -73,7 +73,7 @@ public interface Ocelot extends Animals {
|
||||
* @return Type ID.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@ -85,7 +85,7 @@ public interface Ocelot extends Animals {
|
||||
* @return Resulting type, or null if not found.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
@Nullable
|
||||
public static Type getType(int id) {
|
||||
return (id >= types.length) ? null : types[id];
|
||||
|
@ -32,14 +32,14 @@ public interface Zombie extends Monster, Ageable {
|
||||
* @return Whether the zombie is a villager
|
||||
* @deprecated check if instanceof {@link ZombieVillager}.
|
||||
*/
|
||||
@Deprecated(since = "1.10.2")
|
||||
@Deprecated(since = "1.10.2", forRemoval = true)
|
||||
public boolean isVillager();
|
||||
|
||||
/**
|
||||
* @param flag flag
|
||||
* @deprecated must spawn {@link ZombieVillager}.
|
||||
*/
|
||||
@Deprecated(since = "1.9")
|
||||
@Deprecated(since = "1.9", forRemoval = true)
|
||||
@Contract("_ -> fail")
|
||||
public void setVillager(boolean flag);
|
||||
|
||||
@ -47,7 +47,7 @@ public interface Zombie extends Monster, Ageable {
|
||||
* @param profession profession
|
||||
* @see ZombieVillager#getVillagerProfession()
|
||||
*/
|
||||
@Deprecated(since = "1.10.2")
|
||||
@Deprecated(since = "1.10.2", forRemoval = true)
|
||||
@Contract("_ -> fail")
|
||||
public void setVillagerProfession(Villager.Profession profession);
|
||||
|
||||
@ -55,7 +55,7 @@ public interface Zombie extends Monster, Ageable {
|
||||
* @return profession
|
||||
* @see ZombieVillager#getVillagerProfession()
|
||||
*/
|
||||
@Deprecated(since = "1.10.2")
|
||||
@Deprecated(since = "1.10.2", forRemoval = true)
|
||||
@Nullable
|
||||
@Contract("-> null")
|
||||
public Villager.Profession getVillagerProfession();
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.block;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -17,11 +18,12 @@ public class BlockBurnEvent extends BlockEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
private final Block ignitingBlock;
|
||||
|
||||
@Deprecated(since = "1.11.2")
|
||||
@Deprecated(since = "1.11.2", forRemoval = true)
|
||||
public BlockBurnEvent(@NotNull final Block block) {
|
||||
this(block, null);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockBurnEvent(@NotNull final Block block, @Nullable final Block ignitingBlock) {
|
||||
super(block);
|
||||
this.ignitingBlock = ignitingBlock;
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -27,7 +28,7 @@ public class BlockCanBuildEvent extends BlockEvent {
|
||||
private final Player player;
|
||||
private final org.bukkit.inventory.EquipmentSlot hand; // Paper - expose hand
|
||||
|
||||
@Deprecated(since = "1.13.2")
|
||||
@Deprecated(since = "1.13.2", forRemoval = true)
|
||||
public BlockCanBuildEvent(@NotNull final Block block, @NotNull final BlockData type, final boolean canBuild) {
|
||||
this(block, null, type, canBuild, org.bukkit.inventory.EquipmentSlot.HAND); // Paper - expose hand
|
||||
}
|
||||
@ -38,12 +39,13 @@ public class BlockCanBuildEvent extends BlockEvent {
|
||||
* @param type the id of the block to place
|
||||
* @param canBuild whether we can build
|
||||
*/
|
||||
@java.lang.Deprecated // Paper
|
||||
@io.papermc.paper.annotation.DoNotUse // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
@io.papermc.paper.annotation.DoNotUse
|
||||
public BlockCanBuildEvent(@NotNull final Block block, @Nullable final Player player, @NotNull final BlockData type, final boolean canBuild) {
|
||||
this(block, player, type, canBuild, org.bukkit.inventory.EquipmentSlot.HAND); // Paper start - expose hand
|
||||
}
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockCanBuildEvent(@NotNull final Block block, @Nullable final Player player, @NotNull final BlockData type, final boolean canBuild, @NotNull final org.bukkit.inventory.EquipmentSlot hand) { // Paper end - expose hand
|
||||
super(block);
|
||||
this.player = player;
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -16,12 +17,13 @@ public class BlockCookEvent extends BlockEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
private final org.bukkit.inventory.CookingRecipe<?> recipe; // Paper
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public BlockCookEvent(@NotNull final Block block, @NotNull final ItemStack source, @NotNull final ItemStack result) {
|
||||
// Paper start
|
||||
this(block, source, result, null);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockCookEvent(@NotNull final Block block, @NotNull final ItemStack source, @NotNull final ItemStack result, @org.jetbrains.annotations.Nullable org.bukkit.inventory.CookingRecipe<?> recipe) {
|
||||
// Paper end
|
||||
super(block);
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -18,13 +19,13 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class BlockMultiPlaceEvent extends BlockPlaceEvent {
|
||||
private final List<BlockState> states;
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) {
|
||||
// Paper start - add hand to BlockMultiPlaceEvent
|
||||
this(states, clicked, itemInHand, thePlayer, canBuild, org.bukkit.inventory.EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull org.bukkit.inventory.EquipmentSlot hand) {
|
||||
super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild, hand);
|
||||
this.states = ImmutableList.copyOf(states);
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -33,16 +34,18 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {
|
||||
private boolean cancel = false;
|
||||
|
||||
// Paper start - Legacy constructor, use #BlockPhysicsEvent(Block, BlockData, Block)
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public BlockPhysicsEvent(final Block block, final BlockData changed, final int sourceX, final int sourceY, final int sourceZ) {
|
||||
this(block, changed, block.getWorld().getBlockAt(sourceX, sourceY, sourceZ));
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockPhysicsEvent(@NotNull final Block block, @NotNull final BlockData changed) {
|
||||
this(block, changed, block);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockPhysicsEvent(@NotNull final Block block, @NotNull final BlockData changed, @NotNull final Block sourceBlock) {
|
||||
super(block);
|
||||
this.changed = changed;
|
||||
|
@ -6,6 +6,7 @@ import java.util.List;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -16,13 +17,14 @@ public class BlockPistonExtendEvent extends BlockPistonEvent {
|
||||
private final int length;
|
||||
private List<Block> blocks;
|
||||
|
||||
@Deprecated(since = "1.8")
|
||||
@Deprecated(since = "1.8", forRemoval = true)
|
||||
public BlockPistonExtendEvent(@NotNull final Block block, final int length, @NotNull final BlockFace direction) {
|
||||
super(block, direction);
|
||||
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockPistonExtendEvent(@NotNull final Block block, @NotNull final List<Block> blocks, @NotNull final BlockFace direction) {
|
||||
super(block, direction);
|
||||
|
||||
@ -51,7 +53,7 @@ public class BlockPistonExtendEvent extends BlockPistonEvent {
|
||||
@NotNull
|
||||
public List<Block> getBlocks() {
|
||||
if (blocks == null) {
|
||||
ArrayList<Block> tmp = new ArrayList<Block>();
|
||||
List<Block> tmp = new ArrayList<Block>();
|
||||
for (int i = 0; i < this.getLength(); i++) {
|
||||
tmp.add(block.getRelative(getDirection(), i + 1));
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -24,11 +25,12 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
|
||||
protected Player player;
|
||||
protected EquipmentSlot hand;
|
||||
|
||||
@Deprecated(since = "1.9")
|
||||
@Deprecated(since = "1.9", forRemoval = true)
|
||||
public BlockPlaceEvent(@NotNull final Block placedBlock, @NotNull final BlockState replacedBlockState, @NotNull final Block placedAgainst, @NotNull final ItemStack itemInHand, @NotNull final Player thePlayer, final boolean canBuild) {
|
||||
this(placedBlock, replacedBlockState, placedAgainst, itemInHand, thePlayer, canBuild, EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockPlaceEvent(@NotNull final Block placedBlock, @NotNull final BlockState replacedBlockState, @NotNull final Block placedAgainst, @NotNull final ItemStack itemInHand, @NotNull final Player thePlayer, final boolean canBuild, @NotNull final EquipmentSlot hand) {
|
||||
super(placedBlock);
|
||||
this.placedAgainst = placedAgainst;
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.block.sign.Side;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -21,6 +22,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
|
||||
private final Side side;
|
||||
|
||||
// Paper start
|
||||
@ApiStatus.Internal
|
||||
public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player player, @NotNull final java.util.List<net.kyori.adventure.text.Component> adventure$lines, @NotNull Side side) {
|
||||
super(theBlock);
|
||||
this.player = player;
|
||||
@ -28,18 +30,18 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
|
||||
this.side = side;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player player, @NotNull final java.util.List<net.kyori.adventure.text.Component> adventure$lines) {
|
||||
this(theBlock, player, adventure$lines, Side.FRONT);
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@Deprecated(since = "1.19.4")
|
||||
@Deprecated(since = "1.19.4", forRemoval = true)
|
||||
public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player thePlayer, @NotNull final String[] theLines) {
|
||||
this(theBlock, thePlayer, theLines, Side.FRONT);
|
||||
}
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player thePlayer, @NotNull final String[] theLines, @NotNull Side side) {
|
||||
super(theBlock);
|
||||
this.player = thePlayer;
|
||||
|
@ -57,7 +57,7 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
|
||||
* {@link ChunkLoadEvent#isNewChunk()} and {@link Chunk#getEntities()}
|
||||
* for similar effect.
|
||||
*/
|
||||
@Deprecated(since = "1.14")
|
||||
@Deprecated(since = "1.14", forRemoval = true)
|
||||
CHUNK_GEN,
|
||||
/**
|
||||
* When a creature spawns from a spawner
|
||||
|
@ -2,6 +2,7 @@ package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -11,11 +12,12 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class EntityCombustByBlockEvent extends EntityCombustEvent {
|
||||
private final Block combuster;
|
||||
|
||||
@Deprecated(since = "1.21")
|
||||
@Deprecated(since = "1.21", forRemoval = true)
|
||||
public EntityCombustByBlockEvent(@Nullable final Block combuster, @NotNull final Entity combustee, final int duration) {
|
||||
this(combuster, combustee, (float) duration);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public EntityCombustByBlockEvent(@Nullable final Block combuster, @NotNull final Entity combustee, final float duration) {
|
||||
super(combustee, duration);
|
||||
this.combuster = combuster;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -9,11 +10,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class EntityCombustByEntityEvent extends EntityCombustEvent {
|
||||
private final Entity combuster;
|
||||
|
||||
@Deprecated(since = "1.21")
|
||||
@Deprecated(since = "1.21", forRemoval = true)
|
||||
public EntityCombustByEntityEvent(@NotNull final Entity combuster, @NotNull final Entity combustee, final int duration) {
|
||||
this(combuster, combustee, (float) duration);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public EntityCombustByEntityEvent(@NotNull final Entity combuster, @NotNull final Entity combustee, final float duration) {
|
||||
super(combustee, duration);
|
||||
this.combuster = combuster;
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.entity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -15,11 +16,12 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
private float duration;
|
||||
private boolean cancel;
|
||||
|
||||
@Deprecated(since = "1.21")
|
||||
@Deprecated(since = "1.21", forRemoval = true)
|
||||
public EntityCombustEvent(@NotNull final Entity combustee, final int duration) {
|
||||
this(combustee, (float) duration);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public EntityCombustEvent(@NotNull final Entity combustee, final float duration) {
|
||||
super(combustee);
|
||||
this.duration = duration;
|
||||
|
@ -20,7 +20,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent {
|
||||
this(damager, damagee, cause, DamageSource.builder(DamageType.GENERIC).build(), damage);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, final double damage) {
|
||||
super(damagee, cause, damageSource, damage);
|
||||
this.damager = damager;
|
||||
@ -32,7 +32,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent {
|
||||
this(damager, damagee, cause, DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
|
||||
super(damagee, cause, damageSource, modifiers, modifierFunctions);
|
||||
this.damager = damager;
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -26,6 +27,7 @@ public class EntityPlaceEvent extends EntityEvent implements Cancellable {
|
||||
private final BlockFace blockFace;
|
||||
private final EquipmentSlot hand;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public EntityPlaceEvent(@NotNull final Entity entity, @Nullable final Player player, @NotNull final Block block, @NotNull final BlockFace blockFace, @NotNull final EquipmentSlot hand) {
|
||||
super(entity);
|
||||
this.player = player;
|
||||
@ -34,7 +36,7 @@ public class EntityPlaceEvent extends EntityEvent implements Cancellable {
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public EntityPlaceEvent(@NotNull final Entity entity, @Nullable final Player player, @NotNull final Block block, @NotNull final BlockFace blockFace) {
|
||||
this(entity, player, block, blockFace, EquipmentSlot.HAND);
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ public class EntityPotionEffectEvent extends EntityEvent implements Cancellable
|
||||
*
|
||||
* @deprecated no longer used, player now gets an ominous bottle instead
|
||||
*/
|
||||
@Deprecated(since = "1.21") // Paper
|
||||
@Deprecated(since = "1.21", forRemoval = true)
|
||||
PATROL_CAPTAIN,
|
||||
/**
|
||||
* When a potion effect is modified through the plugin methods.
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -20,12 +21,13 @@ public class EntityResurrectEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
private final EquipmentSlot hand;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public EntityResurrectEvent(@NotNull LivingEntity what, @Nullable EquipmentSlot hand) {
|
||||
super(what);
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public EntityResurrectEvent(@NotNull LivingEntity what) {
|
||||
this(what, null);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.checkerframework.checker.signature.qual.InternalForm;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -38,16 +39,18 @@ public class EntityShootBowEvent extends EntityEvent implements Cancellable {
|
||||
return this.getConsumable();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public EntityShootBowEvent(@NotNull final LivingEntity shooter, @Nullable final ItemStack bow, @NotNull final Entity projectile, final float force) {
|
||||
this(shooter, bow, new ItemStack(org.bukkit.Material.AIR), projectile, force);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public EntityShootBowEvent(@NotNull final LivingEntity shooter, @Nullable final ItemStack bow, @NotNull ItemStack arrowItem, @NotNull final Entity projectile, final float force) {
|
||||
this(shooter, bow, arrowItem, projectile, EquipmentSlot.HAND, force, true);
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@InternalForm
|
||||
public EntityShootBowEvent(@NotNull final LivingEntity shooter, @Nullable final ItemStack bow, @Nullable final ItemStack consumable, @NotNull final Entity projectile, @NotNull final EquipmentSlot hand, final float force, final boolean consumeItem) {
|
||||
super(shooter);
|
||||
this.bow = bow;
|
||||
|
@ -105,7 +105,7 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
*
|
||||
* @deprecated obsoleted by {@link #TARGET_ATTACKED_NEARBY_ENTITY}
|
||||
*/
|
||||
@Deprecated(since = "1.13")
|
||||
@Deprecated(since = "1.13", forRemoval = true)
|
||||
PIG_ZOMBIE_TARGET,
|
||||
/**
|
||||
* When the target is forgotten for whatever reason.
|
||||
|
@ -2,6 +2,7 @@ package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -22,11 +23,12 @@ public class EntityUnleashEvent extends EntityEvent implements org.bukkit.event.
|
||||
private boolean cancelled; // Paper
|
||||
|
||||
// Paper start - drop leash variable
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public EntityUnleashEvent(@NotNull Entity entity, @NotNull UnleashReason reason) {
|
||||
this(entity, reason, false);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public EntityUnleashEvent(@NotNull Entity entity, @NotNull UnleashReason reason, boolean dropLeash) {
|
||||
super(entity);
|
||||
// Paper end
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.ThrownExpBottle;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -16,11 +17,12 @@ public class ExpBottleEvent extends ProjectileHitEvent {
|
||||
private int exp;
|
||||
private boolean showEffect = true;
|
||||
|
||||
@Deprecated(since = "1.20.2")
|
||||
@Deprecated(since = "1.20.2", forRemoval = true)
|
||||
public ExpBottleEvent(@NotNull final ThrownExpBottle bottle, final int exp) {
|
||||
this(bottle, null, null, null, exp);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public ExpBottleEvent(@NotNull final ThrownExpBottle bottle, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace, final int exp) {
|
||||
super(bottle, hitEntity, hitBlock, hitFace);
|
||||
this.exp = exp;
|
||||
|
@ -2,6 +2,7 @@ package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -9,11 +10,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class ItemSpawnEvent extends EntitySpawnEvent {
|
||||
|
||||
@Deprecated(since = "1.13.2")
|
||||
@Deprecated(since = "1.13.2", forRemoval = true)
|
||||
public ItemSpawnEvent(@NotNull final Item spawnee, final Location loc) {
|
||||
this(spawnee);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public ItemSpawnEvent(@NotNull final Item spawnee) {
|
||||
super(spawnee);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -19,11 +20,12 @@ public class LingeringPotionSplashEvent extends ProjectileHitEvent implements Ca
|
||||
private final AreaEffectCloud entity;
|
||||
private boolean allowEmptyAreaEffectCreation; // Paper
|
||||
|
||||
@Deprecated(since = "1.20.2")
|
||||
@Deprecated(since = "1.20.2", forRemoval = true)
|
||||
public LingeringPotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final AreaEffectCloud entity) {
|
||||
this(potion, null, null, null, entity);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public LingeringPotionSplashEvent(@NotNull final ThrownPotion potion, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace, @NotNull final AreaEffectCloud entity) {
|
||||
super(potion, hitEntity, hitBlock, hitFace);
|
||||
this.entity = entity;
|
||||
|
@ -34,6 +34,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
// Paper start - shouldDropExperience API
|
||||
this(player, damageSource, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true);
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage, final boolean doExpDrop) {
|
||||
// Paper end - shouldDropExperience API
|
||||
@ -46,23 +47,23 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
}
|
||||
// Paper end - adventure
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, @Nullable final String deathMessage) {
|
||||
this(player, damageSource, drops, droppedExp, 0, deathMessage);
|
||||
}
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, @Nullable final String deathMessage) {
|
||||
this(player, damageSource, drops, droppedExp, newExp, 0, 0, deathMessage);
|
||||
}
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) {
|
||||
// Paper start - shouldDropExperience API
|
||||
this(player, damageSource, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true);
|
||||
}
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerDeathEvent(@NotNull final Player player, final @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage, boolean doExpDrop) {
|
||||
// Paper end - shouldDropExperience API
|
||||
super(player, damageSource, drops, droppedExp);
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -19,6 +20,7 @@ public class PlayerLeashEntityEvent extends Event implements Cancellable {
|
||||
private final Player player;
|
||||
private final EquipmentSlot hand;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerLeashEntityEvent(@NotNull Entity what, @NotNull Entity leashHolder, @NotNull Player leasher, @NotNull EquipmentSlot hand) {
|
||||
this.leashHolder = leashHolder;
|
||||
this.entity = what;
|
||||
@ -26,7 +28,7 @@ public class PlayerLeashEntityEvent extends Event implements Cancellable {
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerLeashEntityEvent(@NotNull Entity what, @NotNull Entity leashHolder, @NotNull Player leasher) {
|
||||
this(what, leashHolder, leasher, EquipmentSlot.HAND);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.ThrownPotion;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -22,11 +23,12 @@ public class PotionSplashEvent extends ProjectileHitEvent implements Cancellable
|
||||
private boolean cancelled;
|
||||
protected final Map<LivingEntity, Double> affectedEntities; // Paper
|
||||
|
||||
@Deprecated(since = "1.20.2")
|
||||
@Deprecated(since = "1.20.2", forRemoval = true)
|
||||
public PotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final Map<LivingEntity, Double> affectedEntities) {
|
||||
this(potion, null, null, null, affectedEntities);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PotionSplashEvent(@NotNull final ThrownPotion potion, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace, @NotNull final Map<LivingEntity, Double> affectedEntities) {
|
||||
super(potion, hitEntity, hitBlock, hitFace);
|
||||
this.affectedEntities = affectedEntities;
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Projectile;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -19,27 +20,27 @@ public class ProjectileHitEvent extends EntityEvent implements Cancellable {
|
||||
private final BlockFace hitFace;
|
||||
private boolean cancel = false;
|
||||
|
||||
@Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
@Deprecated(forRemoval = true) @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile) {
|
||||
this(projectile, null, null, null); // Paper
|
||||
}
|
||||
|
||||
@Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
@Deprecated(forRemoval = true) @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile, @Nullable Entity hitEntity) {
|
||||
this(projectile, hitEntity, null, null); // Paper
|
||||
}
|
||||
|
||||
@Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
@Deprecated(forRemoval = true) @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile, @Nullable Block hitBlock) {
|
||||
this(projectile, null, hitBlock, null); // Paper
|
||||
}
|
||||
|
||||
@Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
@Deprecated(forRemoval = true) @io.papermc.paper.annotation.DoNotUse // Paper
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile, @Nullable Entity hitEntity, @Nullable Block hitBlock) {
|
||||
this(projectile, hitEntity, hitBlock, null);
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@ApiStatus.Internal
|
||||
public ProjectileHitEvent(@NotNull final Projectile projectile, @Nullable Entity hitEntity, @Nullable Block hitBlock, @Nullable BlockFace hitFace) {
|
||||
super(projectile);
|
||||
this.hitEntity = hitEntity;
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Sheep;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -14,11 +15,12 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class SheepDyeWoolEvent extends io.papermc.paper.event.entity.EntityDyeEvent implements Cancellable {
|
||||
// Paper - move everything to superclass
|
||||
|
||||
@Deprecated(since = "1.17.1")
|
||||
@Deprecated(since = "1.17.1", forRemoval = true)
|
||||
public SheepDyeWoolEvent(@NotNull final Sheep sheep, @NotNull final DyeColor color) {
|
||||
this(sheep, color, null);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public SheepDyeWoolEvent(@NotNull final Sheep sheep, @NotNull final DyeColor color, @Nullable Player player) {
|
||||
super(sheep, color, player); // Paper
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -28,6 +29,7 @@ public class HangingPlaceEvent extends HangingEvent implements Cancellable {
|
||||
this(hanging, player, block, blockFace, hand, null);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public HangingPlaceEvent(@NotNull final Hanging hanging, @Nullable final Player player, @NotNull final Block block, @NotNull final BlockFace blockFace, @Nullable final EquipmentSlot hand, @Nullable ItemStack itemStack) {
|
||||
super(hanging);
|
||||
this.player = player;
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.inventory;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.event.block.BlockCookEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -12,13 +13,13 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class FurnaceSmeltEvent extends BlockCookEvent {
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public FurnaceSmeltEvent(@NotNull final Block furnace, @NotNull final ItemStack source, @NotNull final ItemStack result) {
|
||||
super(furnace, source, result);
|
||||
}
|
||||
// Paper start
|
||||
|
||||
@ApiStatus.Internal
|
||||
public FurnaceSmeltEvent(@NotNull final Block furnace, @NotNull final ItemStack source, @NotNull final ItemStack result, @org.jetbrains.annotations.Nullable org.bukkit.inventory.CookingRecipe<?> recipe) {
|
||||
super(furnace, source, result, recipe);
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.block.InventoryBlockStartEvent;
|
||||
import org.bukkit.inventory.CookingRecipe;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -18,12 +19,13 @@ public class FurnaceStartSmeltEvent extends InventoryBlockStartEvent {
|
||||
private final CookingRecipe<?> recipe;
|
||||
private int totalCookTime;
|
||||
|
||||
@Deprecated // Paper - furnace cook speed multiplier
|
||||
@Deprecated(forRemoval = true)
|
||||
public FurnaceStartSmeltEvent(@NotNull final Block furnace, @NotNull ItemStack source, @NotNull final CookingRecipe<?> recipe) {
|
||||
// Paper start
|
||||
this(furnace, source, recipe, recipe.getCookingTime());
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public FurnaceStartSmeltEvent(final @NotNull Block furnace, final @NotNull ItemStack source, final @NotNull CookingRecipe<?> recipe, final int cookingTime) {
|
||||
// Paper end
|
||||
super(furnace, source);
|
||||
|
@ -72,7 +72,7 @@ public enum InventoryAction {
|
||||
* The hotbar includes the player's off hand.
|
||||
* @deprecated This action no longer happens, they are all {@link #HOTBAR_SWAP}s.
|
||||
*/
|
||||
@Deprecated(since = "1.20.6") // Paper
|
||||
@Deprecated(since = "1.20.6", forRemoval = true) // Paper
|
||||
HOTBAR_MOVE_AND_READD,
|
||||
/**
|
||||
* The clicked slot and the picked hotbar slot are swapped.
|
||||
|
@ -4,6 +4,7 @@ import java.net.InetAddress;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -28,16 +29,17 @@ public class AsyncPlayerPreLoginEvent extends Event {
|
||||
private final String hostname; // Paper
|
||||
private final boolean transferred;
|
||||
|
||||
@Deprecated(since = "1.7.5")
|
||||
@Deprecated(since = "1.7.5", forRemoval = true)
|
||||
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress) {
|
||||
this(name, ipAddress, null);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.20.5")
|
||||
@Deprecated(since = "1.20.5", forRemoval = true)
|
||||
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final UUID uniqueId) {
|
||||
this(name, ipAddress, uniqueId, false);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final UUID uniqueId, boolean transferred) {
|
||||
// Paper start
|
||||
this(name, ipAddress, uniqueId, transferred, org.bukkit.Bukkit.createProfile(uniqueId, name));
|
||||
@ -53,7 +55,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
|
||||
this(name, ipAddress, rawAddress, uniqueId, transferred, profile, "");
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
@ApiStatus.Internal
|
||||
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final InetAddress rawAddress, @NotNull final UUID uniqueId, boolean transferred, @NotNull com.destroystokyo.paper.profile.PlayerProfile profile, @NotNull String hostname) {
|
||||
// Paper end
|
||||
super(true);
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.player;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -14,7 +15,7 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||
private final PlayerAnimationType animationType;
|
||||
private boolean isCancelled = false;
|
||||
|
||||
@Deprecated(since = "1.19")
|
||||
@Deprecated(since = "1.19", forRemoval = true)
|
||||
public PlayerAnimationEvent(@NotNull final Player player) {
|
||||
this(player, PlayerAnimationType.ARM_SWING);
|
||||
}
|
||||
@ -25,6 +26,7 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||
* @param player The player instance
|
||||
* @param playerAnimationType The animation type
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public PlayerAnimationEvent(@NotNull final Player player, @NotNull final PlayerAnimationType playerAnimationType) {
|
||||
super(player);
|
||||
animationType = playerAnimationType;
|
||||
|
@ -26,7 +26,7 @@ public class PlayerArmorStandManipulateEvent extends PlayerInteractEntityEvent {
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerArmorStandManipulateEvent(@NotNull final Player who, @NotNull final ArmorStand clickedEntity, @NotNull final ItemStack playerItem, @NotNull final ItemStack armorStandItem, @NotNull final EquipmentSlot slot) {
|
||||
this(who, clickedEntity, playerItem, armorStandItem, slot, EquipmentSlot.HAND);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public class PlayerAttemptPickupItemEvent extends PlayerEvent implements Cancell
|
||||
|
||||
private boolean cancelled;
|
||||
|
||||
@Deprecated // Remove in 1.13 // Remove in 1.14?
|
||||
@Deprecated(forRemoval = true) // Remove in 1.13 // Remove in 1.14? // Remove before the heat death of the universe?
|
||||
@ApiStatus.Internal
|
||||
public PlayerAttemptPickupItemEvent(final Player player, final Item item) {
|
||||
this(player, item, 0);
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -63,13 +64,14 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
|
||||
private final BedEnterResult bedEnterResult;
|
||||
private Result useBed = Result.DEFAULT;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerBedEnterEvent(@NotNull Player who, @NotNull Block bed, @NotNull BedEnterResult bedEnterResult) {
|
||||
super(who);
|
||||
this.bed = bed;
|
||||
this.bedEnterResult = bedEnterResult;
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.13.2")
|
||||
@Deprecated(since = "1.13.2", forRemoval = true)
|
||||
public PlayerBedEnterEvent(@NotNull Player who, @NotNull Block bed) {
|
||||
this(who, bed, BedEnterResult.OK);
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -15,16 +16,17 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class PlayerBucketEmptyEvent extends PlayerBucketEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Deprecated(since = "1.14.4")
|
||||
@Deprecated(since = "1.14.4", forRemoval = true)
|
||||
public PlayerBucketEmptyEvent(@NotNull final Player who, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
super(who, blockClicked, blockFace, bucket, itemInHand);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerBucketEmptyEvent(@NotNull final Player who, @NotNull final Block block, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
super(who, block, blockClicked, blockFace, bucket, itemInHand);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerBucketEmptyEvent(@NotNull final Player who, @NotNull final Block block, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand, @NotNull final EquipmentSlot hand) {
|
||||
super(who, block, blockClicked, blockFace, bucket, itemInHand, hand);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -24,16 +25,17 @@ public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellab
|
||||
private final Material bucket;
|
||||
private final EquipmentSlot hand;
|
||||
|
||||
@Deprecated(since = "1.14.4")
|
||||
@Deprecated(since = "1.14.4", forRemoval = true)
|
||||
public PlayerBucketEvent(@NotNull final Player who, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
this(who, null, blockClicked.getRelative(blockFace), blockFace, bucket, itemInHand, EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerBucketEvent(@NotNull final Player who, @NotNull final Block block, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
this(who, block, blockClicked, blockFace, bucket, itemInHand, EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerBucketEvent(@NotNull final Player who, @NotNull final Block block, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand, @NotNull final EquipmentSlot hand) {
|
||||
super(who);
|
||||
this.block = block;
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -15,16 +16,17 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class PlayerBucketFillEvent extends PlayerBucketEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Deprecated(since = "1.14.4")
|
||||
@Deprecated(since = "1.14.4", forRemoval = true)
|
||||
public PlayerBucketFillEvent(@NotNull final Player who, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
super(who, blockClicked, blockFace, bucket, itemInHand);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerBucketFillEvent(@NotNull final Player who, @NotNull final Block block, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
super(who, block, blockClicked, blockFace, bucket, itemInHand);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerBucketFillEvent(@NotNull final Player who, @NotNull final Block block, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand, @NotNull final EquipmentSlot hand) {
|
||||
super(who, block, blockClicked, blockFace, bucket, itemInHand, hand);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public class PlayerEditBookEvent extends PlayerEvent implements Cancellable {
|
||||
* @return the inventory slot number that the book item occupies
|
||||
* @deprecated books may be signed from off hand
|
||||
*/
|
||||
@Deprecated(since = "1.13.1")
|
||||
@Deprecated(since = "1.13.1", forRemoval = true)
|
||||
public int getSlot() {
|
||||
return slot;
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.GameMode;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -22,12 +23,13 @@ public class PlayerGameModeChangeEvent extends PlayerEvent implements Cancellabl
|
||||
private final Cause cause;
|
||||
private net.kyori.adventure.text.Component cancelMessage;
|
||||
|
||||
@Deprecated // Paper end
|
||||
@Deprecated(forRemoval = true) // Paper end
|
||||
public PlayerGameModeChangeEvent(@NotNull final Player player, @NotNull final GameMode newGameMode) {
|
||||
// Paper start
|
||||
this(player, newGameMode, Cause.UNKNOWN, null);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerGameModeChangeEvent(@NotNull final Player player, @NotNull final GameMode newGameMode, @NotNull Cause cause, @org.jetbrains.annotations.Nullable net.kyori.adventure.text.Component cancelMessage) {
|
||||
// Paper end
|
||||
super(player);
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -27,6 +28,7 @@ public class PlayerHarvestBlockEvent extends PlayerEvent implements Cancellable
|
||||
private final EquipmentSlot hand;
|
||||
private final List<ItemStack> itemsHarvested;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerHarvestBlockEvent(@NotNull Player player, @NotNull Block harvestedBlock, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> itemsHarvested) {
|
||||
super(player);
|
||||
this.harvestedBlock = harvestedBlock;
|
||||
@ -34,7 +36,7 @@ public class PlayerHarvestBlockEvent extends PlayerEvent implements Cancellable
|
||||
this.itemsHarvested = itemsHarvested;
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerHarvestBlockEvent(@NotNull Player player, @NotNull Block harvestedBlock, @NotNull List<ItemStack> itemsHarvested) {
|
||||
this(player, harvestedBlock, EquipmentSlot.HAND, itemsHarvested);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -31,6 +32,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||
* @param item the ItemStack being consumed
|
||||
* @param hand the hand that was used
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public PlayerItemConsumeEvent(@NotNull final Player player, @NotNull final ItemStack item, @NotNull final EquipmentSlot hand) {
|
||||
super(player);
|
||||
|
||||
@ -43,7 +45,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||
* @param item the ItemStack being consumed
|
||||
* @deprecated use {@link #PlayerItemConsumeEvent(Player, ItemStack, EquipmentSlot)}
|
||||
*/
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerItemConsumeEvent(@NotNull final Player player, @NotNull final ItemStack item) {
|
||||
this(player, item, EquipmentSlot.HAND);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -14,16 +15,17 @@ public class PlayerItemDamageEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final ItemStack item;
|
||||
private final int originalDamage;
|
||||
private int damage;
|
||||
private int originalDamage; // Paper - Add pre-reduction damage
|
||||
private boolean cancelled = false;
|
||||
|
||||
@Deprecated // Paper - Add pre-reduction damage
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerItemDamageEvent(@NotNull Player player, @NotNull ItemStack what, int damage) {
|
||||
// Paper start - Add pre-reduction damage
|
||||
this(player, what, damage, damage);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerItemDamageEvent(@NotNull Player player, @NotNull ItemStack what, int damage, int originalDamage) {
|
||||
super(player);
|
||||
this.item = what;
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -26,13 +27,13 @@ public class PlayerItemMendEvent extends PlayerEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
private final int consumedExperience; // Paper
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true) // Paper
|
||||
public PlayerItemMendEvent(@NotNull Player who, @NotNull ItemStack item, @NotNull EquipmentSlot slot, @NotNull ExperienceOrb experienceOrb, int repairAmount) {
|
||||
// Paper start
|
||||
this(who, item, slot, experienceOrb, repairAmount, repairAmount / 2);
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
@ApiStatus.Internal
|
||||
public PlayerItemMendEvent(@NotNull Player who, @NotNull ItemStack item, @NotNull EquipmentSlot slot, @NotNull ExperienceOrb experienceOrb, int repairAmount, int consumedExperience) {
|
||||
// Paper end
|
||||
super(who);
|
||||
@ -86,7 +87,7 @@ public class PlayerItemMendEvent extends PlayerEvent implements Cancellable {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerItemMendEvent(@NotNull Player who, @NotNull ItemStack item, @NotNull ExperienceOrb experienceOrb, int repairAmount) {
|
||||
this(who, item, null, experienceOrb, repairAmount);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -12,12 +13,14 @@ public class PlayerJoinEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
// Paper start
|
||||
private net.kyori.adventure.text.Component joinMessage;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerJoinEvent(@NotNull final Player playerJoined, @Nullable final net.kyori.adventure.text.Component joinMessage) {
|
||||
super(playerJoined);
|
||||
this.joinMessage = joinMessage;
|
||||
}
|
||||
|
||||
@Deprecated // Paper end
|
||||
@Deprecated(forRemoval = true) // Paper end
|
||||
public PlayerJoinEvent(@NotNull final Player playerJoined, @Nullable final String joinMessage) {
|
||||
super(playerJoined);
|
||||
this.joinMessage = joinMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(joinMessage) : null; // Paper end
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.player;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -15,7 +16,7 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
|
||||
private final Cause cause; // Paper
|
||||
private boolean cancel;
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerKickEvent(@NotNull final Player playerKicked, @NotNull final String kickReason, @NotNull final String leaveMessage) {
|
||||
super(playerKicked);
|
||||
this.kickReason = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(kickReason); // Paper
|
||||
@ -24,7 +25,7 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
|
||||
this.cancel = false;
|
||||
}
|
||||
// Paper start
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerKickEvent(@NotNull final Player playerKicked, @NotNull final net.kyori.adventure.text.Component kickReason, @NotNull final net.kyori.adventure.text.Component leaveMessage) {
|
||||
super(playerKicked);
|
||||
this.kickReason = kickReason;
|
||||
@ -33,7 +34,7 @@ public class PlayerKickEvent extends PlayerEvent implements Cancellable {
|
||||
this.cause = Cause.UNKNOWN;
|
||||
}
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
@ApiStatus.Internal
|
||||
public PlayerKickEvent(@NotNull final Player playerKicked, @NotNull final net.kyori.adventure.text.Component kickReason, @NotNull final net.kyori.adventure.text.Component leaveMessage, @NotNull final Cause cause) {
|
||||
super(playerKicked);
|
||||
this.kickReason = kickReason;
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.player;
|
||||
import java.net.InetAddress;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -30,6 +31,7 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
* timing issues
|
||||
* @param realAddress the actual, unspoofed connecting address
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public PlayerLoginEvent(@NotNull final Player player, @NotNull final String hostname, @NotNull final InetAddress address, final @NotNull InetAddress realAddress) {
|
||||
super(player);
|
||||
this.hostname = hostname;
|
||||
@ -46,6 +48,7 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
* @param address The address the player used to connect, provided for
|
||||
* timing issues
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public PlayerLoginEvent(@NotNull final Player player, @NotNull final String hostname, @NotNull final InetAddress address) {
|
||||
this(player, hostname, address, address);
|
||||
}
|
||||
@ -62,7 +65,7 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
* @param realAddress the actual, unspoofed connecting address
|
||||
* @deprecated in favour of {@link #PlayerLoginEvent(Player, String, InetAddress, Result, net.kyori.adventure.text.Component, InetAddress)}
|
||||
*/
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final String message, @NotNull final InetAddress realAddress) {
|
||||
this(player, hostname, address, realAddress);
|
||||
this.result = result;
|
||||
@ -81,6 +84,7 @@ public class PlayerLoginEvent extends PlayerEvent {
|
||||
* @param message The message to be displayed if result denies login
|
||||
* @param realAddress the actual, unspoofed connecting address
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public PlayerLoginEvent(@NotNull final Player player, @NotNull String hostname, @NotNull final InetAddress address, @NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message, @NotNull final InetAddress realAddress) {
|
||||
this(player, hostname, address, realAddress); // Spigot
|
||||
this.result = result;
|
||||
|
@ -62,7 +62,7 @@ public class PlayerPortalEvent extends PlayerTeleportEvent {
|
||||
* @return no effect
|
||||
* @deprecated No effect
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
@Override
|
||||
public boolean willDismountPlayer() {
|
||||
return super.willDismountPlayer();
|
||||
@ -73,7 +73,7 @@ public class PlayerPortalEvent extends PlayerTeleportEvent {
|
||||
* @return no effect
|
||||
* @deprecated No effect
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
@Override
|
||||
public @NotNull java.util.Set<io.papermc.paper.entity.TeleportFlag.@NotNull Relative> getRelativeTeleportationFlags() {
|
||||
return super.getRelativeTeleportationFlags();
|
||||
|
@ -5,6 +5,7 @@ import java.util.UUID;
|
||||
import org.bukkit.Warning;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -31,11 +32,12 @@ public class PlayerPreLoginEvent extends Event {
|
||||
private final InetAddress ipAddress;
|
||||
private final UUID uniqueId;
|
||||
|
||||
@Deprecated(since = "1.7.5")
|
||||
@Deprecated(since = "1.7.5", forRemoval = true)
|
||||
public PlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress) {
|
||||
this(name, ipAddress, null);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final UUID uniqueId) {
|
||||
this.result = Result.ALLOWED;
|
||||
this.message = net.kyori.adventure.text.Component.empty(); // Paper
|
||||
|
@ -2,6 +2,7 @@ package org.bukkit.event.player;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -13,22 +14,24 @@ public class PlayerQuitEvent extends PlayerEvent {
|
||||
private net.kyori.adventure.text.Component quitMessage; // Paper
|
||||
private final QuitReason reason; // Paper
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerQuitEvent(@NotNull final Player who, @Nullable final String quitMessage) {
|
||||
// Paper start
|
||||
this(who, quitMessage, null);
|
||||
}
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerQuitEvent(@NotNull final Player who, @Nullable final String quitMessage, @Nullable QuitReason quitReason) {
|
||||
super(who);
|
||||
this.quitMessage = quitMessage != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(quitMessage) : null; // Paper
|
||||
this.reason = quitReason == null ? QuitReason.DISCONNECTED : quitReason;
|
||||
}
|
||||
// Paper start
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerQuitEvent(@NotNull final Player who, @Nullable final net.kyori.adventure.text.Component quitMessage) {
|
||||
this(who, quitMessage, null);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerQuitEvent(@NotNull final Player who, @Nullable final net.kyori.adventure.text.Component quitMessage, @Nullable QuitReason quitReason) {
|
||||
super(who);
|
||||
this.quitMessage = quitMessage;
|
||||
|
@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -20,22 +21,23 @@ public class PlayerRespawnEvent extends PlayerEvent {
|
||||
private final RespawnReason respawnReason;
|
||||
private final java.util.Set<RespawnFlag> respawnFlags; // Paper
|
||||
|
||||
@Deprecated(since = "1.16.1")
|
||||
@Deprecated(since = "1.16.1", forRemoval = true)
|
||||
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn) {
|
||||
this(respawnPlayer, respawnLocation, isBedSpawn, false);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.4")
|
||||
@Deprecated(since = "1.19.4", forRemoval = true)
|
||||
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn, final boolean isAnchorSpawn) {
|
||||
this(respawnPlayer, respawnLocation, isBedSpawn, false, RespawnReason.PLUGIN);
|
||||
}
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn, final boolean isAnchorSpawn, @NotNull final RespawnReason respawnReason) {
|
||||
// Paper start
|
||||
this(respawnPlayer, respawnLocation, isBedSpawn, isAnchorSpawn, respawnReason, com.google.common.collect.ImmutableSet.builder());
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn, final boolean isAnchorSpawn, @NotNull final RespawnReason respawnReason, @NotNull final com.google.common.collect.ImmutableSet.Builder<org.bukkit.event.player.PlayerRespawnEvent.RespawnFlag> respawnFlags) {
|
||||
// Paper end
|
||||
super(respawnPlayer);
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -19,13 +20,14 @@ public class PlayerRiptideEvent extends PlayerEvent {
|
||||
private final ItemStack item;
|
||||
private final Vector velocity;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerRiptideEvent(@NotNull final Player who, @NotNull final ItemStack item, @NotNull Vector velocity) {
|
||||
super(who);
|
||||
this.item = item;
|
||||
this.velocity = velocity;
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.20.4")
|
||||
@Deprecated(since = "1.20.4", forRemoval = true)
|
||||
public PlayerRiptideEvent(@NotNull final Player who, @NotNull final ItemStack item) {
|
||||
this(who, item, new Vector());
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -20,7 +21,7 @@ public class PlayerShearEntityEvent extends PlayerEvent implements Cancellable {
|
||||
private final EquipmentSlot hand;
|
||||
private java.util.List<ItemStack> drops; // Paper - custom shear drops
|
||||
|
||||
@org.jetbrains.annotations.ApiStatus.Internal // Paper
|
||||
@ApiStatus.Internal
|
||||
public PlayerShearEntityEvent(@NotNull Player who, @NotNull Entity what, @NotNull ItemStack item, @NotNull EquipmentSlot hand, final java.util.@NotNull List<ItemStack> drops) { // Paper - custom shear drops
|
||||
super(who);
|
||||
this.what = what;
|
||||
@ -29,7 +30,7 @@ public class PlayerShearEntityEvent extends PlayerEvent implements Cancellable {
|
||||
this.drops = drops; // Paper - custom shear drops
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.15.2")
|
||||
@Deprecated(since = "1.15.2", forRemoval = true)
|
||||
public PlayerShearEntityEvent(@NotNull final Player who, @NotNull final Entity what) {
|
||||
this(who, what, new ItemStack(Material.SHEARS), EquipmentSlot.HAND, java.util.Collections.emptyList()); // Paper - custom shear drops
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.entity.EntityUnleashEvent;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -18,11 +19,12 @@ public class PlayerUnleashEntityEvent extends EntityUnleashEvent implements Canc
|
||||
private final EquipmentSlot hand;
|
||||
|
||||
// Paper start - drop leash variable
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public PlayerUnleashEntityEvent(@NotNull Entity entity, @NotNull Player player, @NotNull EquipmentSlot hand) {
|
||||
this(entity, player, hand, false);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PlayerUnleashEntityEvent(@NotNull Entity entity, @NotNull Player player, @NotNull EquipmentSlot hand, boolean dropLeash) {
|
||||
super(entity, UnleashReason.PLAYER_UNLEASH, dropLeash);
|
||||
// Paper end
|
||||
@ -30,7 +32,7 @@ public class PlayerUnleashEntityEvent extends EntityUnleashEvent implements Canc
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.19.2")
|
||||
@Deprecated(since = "1.19.2", forRemoval = true)
|
||||
public PlayerUnleashEntityEvent(@NotNull Entity entity, @NotNull Player player) {
|
||||
this(entity, player, EquipmentSlot.HAND);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -22,12 +23,12 @@ public class BroadcastMessageEvent extends ServerEvent implements Cancellable {
|
||||
private final Set<CommandSender> recipients;
|
||||
private boolean cancelled = false;
|
||||
|
||||
@Deprecated(since = "1.14")
|
||||
@Deprecated(since = "1.14", forRemoval = true)
|
||||
public BroadcastMessageEvent(@NotNull String message, @NotNull Set<CommandSender> recipients) {
|
||||
this(false, message, recipients);
|
||||
}
|
||||
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
public BroadcastMessageEvent(boolean isAsync, @NotNull String message, @NotNull Set<CommandSender> recipients) {
|
||||
// Paper start
|
||||
super(isAsync);
|
||||
@ -35,11 +36,12 @@ public class BroadcastMessageEvent extends ServerEvent implements Cancellable {
|
||||
this.recipients = recipients;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public BroadcastMessageEvent(net.kyori.adventure.text.@NotNull Component message, @NotNull Set<CommandSender> recipients) {
|
||||
this(false, message, recipients);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BroadcastMessageEvent(boolean isAsync, net.kyori.adventure.text.@NotNull Component message, @NotNull Set<CommandSender> recipients) {
|
||||
// Paper end
|
||||
super(isAsync);
|
||||
|
@ -8,6 +8,7 @@ import org.bukkit.UndefinedNullability;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.util.CachedServerIcon;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -26,6 +27,8 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
private final int numPlayers;
|
||||
private int maxPlayers;
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@ApiStatus.Internal
|
||||
public ServerListPingEvent(@NotNull final String hostname, @NotNull final InetAddress address, @NotNull final String motd, final int numPlayers, final int maxPlayers) {
|
||||
super(true);
|
||||
Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online", numPlayers);
|
||||
@ -47,7 +50,8 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* @param maxPlayers the max number of players
|
||||
* @deprecated in favour of {@link #ServerListPingEvent(String, java.net.InetAddress, net.kyori.adventure.text.Component, int)}
|
||||
*/
|
||||
@Deprecated // Paper
|
||||
@Deprecated(forRemoval = true)
|
||||
@ApiStatus.Internal
|
||||
protected ServerListPingEvent(@NotNull final String hostname, @NotNull final InetAddress address, @NotNull final String motd, final int maxPlayers) {
|
||||
super(true);
|
||||
this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||
@ -56,11 +60,14 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
this.motd = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(motd); // Paper
|
||||
this.maxPlayers = maxPlayers;
|
||||
}
|
||||
// Paper start
|
||||
@Deprecated
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@ApiStatus.Internal
|
||||
public ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int numPlayers, final int maxPlayers) {
|
||||
this("", address, motd, numPlayers, maxPlayers);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public ServerListPingEvent(@NotNull final String hostname, @NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int numPlayers, final int maxPlayers) {
|
||||
super(true);
|
||||
Preconditions.checkArgument(numPlayers >= 0, "Cannot have negative number of players online (%s)", numPlayers);
|
||||
@ -80,7 +87,8 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* @param maxPlayers the max number of players
|
||||
* @deprecated in favour of {@link #ServerListPingEvent(String, java.net.InetAddress, net.kyori.adventure.text.Component, int)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
@ApiStatus.Internal
|
||||
protected ServerListPingEvent(@NotNull final InetAddress address, @NotNull final net.kyori.adventure.text.Component motd, final int maxPlayers) {
|
||||
this("", address, motd, maxPlayers);
|
||||
}
|
||||
@ -95,6 +103,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* @param motd the message of the day
|
||||
* @param maxPlayers the max number of players
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
protected ServerListPingEvent(final @NotNull String hostname, final @NotNull InetAddress address, final net.kyori.adventure.text.@NotNull Component motd, final int maxPlayers) {
|
||||
this.numPlayers = MAGIC_PLAYER_COUNT;
|
||||
this.hostname = hostname;
|
||||
@ -118,7 +127,6 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
public void motd(net.kyori.adventure.text.@NotNull Component motd) {
|
||||
this.motd = motd;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Gets the hostname that the player used to connect to the server, or
|
||||
@ -196,7 +204,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* @return true if chat preview is enabled, false otherwise
|
||||
* @deprecated chat previews have been removed
|
||||
*/
|
||||
@Deprecated(since = "1.19.3")
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
public boolean shouldSendChatPreviews() {
|
||||
return false;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.vehicle;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -13,11 +14,12 @@ public class VehicleBlockCollisionEvent extends VehicleCollisionEvent {
|
||||
private final org.bukkit.util.Vector velocity; // Paper
|
||||
|
||||
// Paper start - Add pre-collision velocity
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public VehicleBlockCollisionEvent(@NotNull final Vehicle vehicle, @NotNull final Block block) {
|
||||
this(vehicle, block, vehicle.getVelocity());
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public VehicleBlockCollisionEvent(@NotNull final Vehicle vehicle, @NotNull final Block block, @NotNull final org.bukkit.util.Vector velocity) { // Paper - Added velocity
|
||||
super(vehicle);
|
||||
this.block = block;
|
||||
|
@ -4,6 +4,7 @@ import org.bukkit.World;
|
||||
import org.bukkit.entity.LightningStrike;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -15,11 +16,12 @@ public class LightningStrikeEvent extends WeatherEvent implements Cancellable {
|
||||
private final LightningStrike bolt;
|
||||
private final Cause cause;
|
||||
|
||||
@Deprecated(since = "1.13.1")
|
||||
@Deprecated(since = "1.13.1", forRemoval = true)
|
||||
public LightningStrikeEvent(@NotNull final World world, @NotNull final LightningStrike bolt) {
|
||||
this(world, bolt, Cause.UNKNOWN);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public LightningStrikeEvent(@NotNull final World world, @NotNull final LightningStrike bolt, @NotNull final Cause cause) {
|
||||
super(world);
|
||||
this.bolt = bolt;
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.weather;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -12,16 +13,16 @@ public class ThunderChangeEvent extends WeatherEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean canceled;
|
||||
private final boolean to;
|
||||
// Paper start
|
||||
private final Cause cause;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public ThunderChangeEvent(@NotNull final World world, final boolean to, @NotNull final Cause cause) {
|
||||
super(world);
|
||||
this.to = to;
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
@Deprecated // Paper end
|
||||
@Deprecated(forRemoval = true)
|
||||
public ThunderChangeEvent(@NotNull final World world, final boolean to) {
|
||||
super(world);
|
||||
this.to = to;
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.event.weather;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -12,16 +13,16 @@ public class WeatherChangeEvent extends WeatherEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean canceled;
|
||||
private final boolean to;
|
||||
// Paper start
|
||||
private final Cause cause;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public WeatherChangeEvent(@NotNull final World world, final boolean to, @NotNull Cause cause) {
|
||||
super(world);
|
||||
this.to = to;
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
@Deprecated // Paper end
|
||||
@Deprecated(forRemoval = true)
|
||||
public WeatherChangeEvent(@NotNull final World world, final boolean to) {
|
||||
super(world);
|
||||
this.to = to;
|
||||
|
@ -6,6 +6,7 @@ import org.bukkit.block.BlockState;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -19,11 +20,12 @@ public class PortalCreateEvent extends WorldEvent implements Cancellable {
|
||||
private final Entity entity;
|
||||
private final CreateReason reason;
|
||||
|
||||
@Deprecated(since = "1.14.1")
|
||||
@Deprecated(since = "1.14.1", forRemoval = true)
|
||||
public PortalCreateEvent(@NotNull final List<BlockState> blocks, @NotNull final World world, @NotNull CreateReason reason) {
|
||||
this(blocks, world, null, reason);
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public PortalCreateEvent(@NotNull final List<BlockState> blocks, @NotNull final World world, @Nullable Entity entity, @NotNull CreateReason reason) {
|
||||
super(world);
|
||||
|
||||
|
@ -4,6 +4,7 @@ import java.util.Collections;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -11,22 +12,22 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class FurnaceRecipe extends CookingRecipe<FurnaceRecipe> {
|
||||
|
||||
@Deprecated(since = "1.13")
|
||||
@Deprecated(since = "1.13", forRemoval = true)
|
||||
public FurnaceRecipe(@NotNull ItemStack result, @NotNull Material source) {
|
||||
this(NamespacedKey.randomKey(), result, source, 0, 0, 200);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.13")
|
||||
@Deprecated(since = "1.13", forRemoval = true)
|
||||
public FurnaceRecipe(@NotNull ItemStack result, @NotNull MaterialData source) {
|
||||
this(NamespacedKey.randomKey(), result, source.getItemType(), source.getData(), 0, 200);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.13")
|
||||
@Deprecated(since = "1.13", forRemoval = true)
|
||||
public FurnaceRecipe(@NotNull ItemStack result, @NotNull MaterialData source, float experience) {
|
||||
this(NamespacedKey.randomKey(), result, source.getItemType(), source.getData(), experience, 200);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
public FurnaceRecipe(@NotNull ItemStack result, @NotNull Material source, int data) {
|
||||
this(NamespacedKey.randomKey(), result, source, data, 0, 200);
|
||||
}
|
||||
@ -40,11 +41,12 @@ public class FurnaceRecipe extends CookingRecipe<FurnaceRecipe> {
|
||||
* @param experience The experience given by this recipe
|
||||
* @param cookingTime The cooking time (in ticks)
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) {
|
||||
this(key, result, source, 0, experience, cookingTime);
|
||||
}
|
||||
|
||||
@Deprecated(since = "1.9")
|
||||
@Deprecated(since = "1.9", forRemoval = true)
|
||||
public FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, int data, float experience, int cookingTime) {
|
||||
this(key, result, new RecipeChoice.MaterialChoice(Collections.singletonList(source)), experience, cookingTime);
|
||||
}
|
||||
@ -58,6 +60,7 @@ public class FurnaceRecipe extends CookingRecipe<FurnaceRecipe> {
|
||||
* @param experience The experience given by this recipe
|
||||
* @param cookingTime The cooking time (in ticks)
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) {
|
||||
super(key, result, input, experience, cookingTime);
|
||||
}
|
||||
@ -70,7 +73,7 @@ public class FurnaceRecipe extends CookingRecipe<FurnaceRecipe> {
|
||||
* @deprecated use {@link #setInputChoice(RecipeChoice)}
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public FurnaceRecipe setInput(@NotNull MaterialData input) {
|
||||
return setInput(input.getItemType(), input.getData());
|
||||
}
|
||||
@ -90,7 +93,7 @@ public class FurnaceRecipe extends CookingRecipe<FurnaceRecipe> {
|
||||
* @return The changed recipe, so you can chain calls.
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated(since = "1.6.2")
|
||||
@Deprecated(since = "1.6.2", forRemoval = true)
|
||||
public FurnaceRecipe setInput(@NotNull Material input, int data) {
|
||||
return setInputChoice(new RecipeChoice.MaterialChoice(Collections.singletonList(input)));
|
||||
}
|
||||
|
@ -2404,7 +2404,7 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
* @deprecated creative categories no longer exist on the server
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated(since = "1.20.6")
|
||||
@Deprecated(since = "1.20.6", forRemoval = true)
|
||||
CreativeCategory getCreativeCategory();
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,6 @@ public interface MapMeta extends ItemMeta {
|
||||
* @return true if this has a map ID number.
|
||||
* @see #hasMapView()
|
||||
*/
|
||||
//@Deprecated(since = "1.13.2") // Paper
|
||||
boolean hasMapId();
|
||||
|
||||
/**
|
||||
@ -30,7 +29,6 @@ public interface MapMeta extends ItemMeta {
|
||||
* @return the map ID that is set
|
||||
* @see #getMapView()
|
||||
*/
|
||||
// @Deprecated(since = "1.13.2") // Paper
|
||||
int getMapId();
|
||||
|
||||
/**
|
||||
|
@ -20,7 +20,7 @@ public interface PotionMeta extends ItemMeta {
|
||||
* @param data PotionData to set the base potion state to
|
||||
* @deprecated Upgraded / extended potions are now their own {@link PotionType} use {@link #setBasePotionType} instead.
|
||||
*/
|
||||
@Deprecated(since = "1.20.6")
|
||||
@Deprecated(since = "1.20.6", forRemoval = true)
|
||||
void setBasePotionData(@Nullable PotionData data);
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ public interface PotionMeta extends ItemMeta {
|
||||
* @deprecated Upgraded / extended potions are now their own {@link PotionType} use {@link #getBasePotionType()} instead.
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated(since = "1.20.6")
|
||||
@Deprecated(since = "1.20.6", forRemoval = true)
|
||||
PotionData getBasePotionData();
|
||||
|
||||
/**
|
||||
|
@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* {@link org.bukkit.persistence.PersistentDataHolder} API. Please use
|
||||
* {@link org.bukkit.persistence.PersistentDataHolder} instead of this.
|
||||
*/
|
||||
@Deprecated(since = "1.14")
|
||||
@Deprecated(since = "1.14", forRemoval = true)
|
||||
public interface CustomItemTagContainer {
|
||||
|
||||
/**
|
||||
|
@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* @deprecated this API part has been replaced by {@link PersistentDataHolder}.
|
||||
* Please use {@link PersistentDataAdapterContext} instead of this.
|
||||
*/
|
||||
@Deprecated(since = "1.14")
|
||||
@Deprecated(since = "1.14", forRemoval = true)
|
||||
public interface ItemTagAdapterContext {
|
||||
|
||||
/**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user