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