#1082: Add "since" to Deprecation annotations
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@ public class BlockBurnEvent extends BlockEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
private final Block ignitingBlock;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.11.2")
|
||||
public BlockBurnEvent(@NotNull final Block block) {
|
||||
this(block, null);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class BlockCanBuildEvent extends BlockEvent {
|
||||
protected BlockData blockData;
|
||||
private final Player player;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13.2")
|
||||
public BlockCanBuildEvent(@NotNull final Block block, @NotNull final BlockData type, final boolean canBuild) {
|
||||
this(block, null, type, canBuild);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class BlockPistonExtendEvent extends BlockPistonEvent {
|
||||
private final int length;
|
||||
private List<Block> blocks;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.8")
|
||||
public BlockPistonExtendEvent(@NotNull final Block block, final int length, @NotNull final BlockFace direction) {
|
||||
super(block, direction);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class BlockPistonExtendEvent extends BlockPistonEvent {
|
||||
* @deprecated slime blocks make the value of this method
|
||||
* inaccurate due to blocks being pushed at the side
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.8")
|
||||
public int getLength() {
|
||||
return this.length;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class BlockPistonRetractEvent extends BlockPistonEvent {
|
||||
*
|
||||
* @return The possible location of the possibly moving block.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.8")
|
||||
@NotNull
|
||||
public Location getRetractLocation() {
|
||||
return getBlock().getRelative(getDirection(), 2).getLocation();
|
||||
|
||||
@@ -24,7 +24,7 @@ public class BlockPlaceEvent extends BlockEvent implements Cancellable {
|
||||
protected Player player;
|
||||
protected EquipmentSlot hand;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.9")
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class CauldronLevelChangeEvent extends BlockEvent implements Cancellable
|
||||
* @see #getBlock()
|
||||
* @deprecated not all cauldron contents are Levelled
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.17")
|
||||
public int getOldLevel() {
|
||||
BlockData oldBlock = getBlock().getBlockData();
|
||||
return (oldBlock instanceof Levelled) ? ((Levelled) oldBlock).getLevel() : ((oldBlock.getMaterial() == Material.CAULDRON) ? 0 : 3);
|
||||
@@ -73,7 +73,7 @@ public class CauldronLevelChangeEvent extends BlockEvent implements Cancellable
|
||||
* @see #getNewState()
|
||||
* @deprecated not all cauldron contents are Levelled
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.17")
|
||||
public int getNewLevel() {
|
||||
BlockData newBlock = newState.getBlockData();
|
||||
return (newBlock instanceof Levelled) ? ((Levelled) newBlock).getLevel() : ((newBlock.getMaterial() == Material.CAULDRON) ? 0 : 3);
|
||||
@@ -86,7 +86,7 @@ public class CauldronLevelChangeEvent extends BlockEvent implements Cancellable
|
||||
* @see #getNewState()
|
||||
* @deprecated not all cauldron contents are Levelled
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.17")
|
||||
public void setNewLevel(int newLevel) {
|
||||
Preconditions.checkArgument(0 <= newLevel && newLevel <= 3, "Cauldron level out of bounds 0 <= %s <= 3", newLevel);
|
||||
if (newLevel == 0) {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class NotePlayEvent extends BlockEvent implements Cancellable {
|
||||
* @param instrument the Instrument. Has no effect if null.
|
||||
* @deprecated no effect on newer Minecraft versions
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13")
|
||||
public void setInstrument(@NotNull Instrument instrument) {
|
||||
if (instrument != null) {
|
||||
this.instrument = instrument;
|
||||
@@ -73,7 +73,7 @@ public class NotePlayEvent extends BlockEvent implements Cancellable {
|
||||
* @param note the Note. Has no effect if null.
|
||||
* @deprecated no effect on newer Minecraft versions
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13")
|
||||
public void setNote(@NotNull Note note) {
|
||||
if (note != null) {
|
||||
this.note = note;
|
||||
|
||||
@@ -20,7 +20,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
|
||||
private final String[] lines;
|
||||
private final Side side;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.4")
|
||||
public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player thePlayer, @NotNull final String[] theLines) {
|
||||
this(theBlock, thePlayer, theLines, Side.FRONT);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
||||
* @deprecated Use {@link #getOffers()} instead of this method
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.5")
|
||||
public int[] getExpLevelCostsOffered() {
|
||||
int[] levelOffers = new int[offers.length];
|
||||
for (int i = 0; i < offers.length; i++) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class CreatureSpawnEvent extends EntitySpawnEvent {
|
||||
* {@link ChunkLoadEvent#isNewChunk()} and {@link Chunk#getEntities()}
|
||||
* for similar effect.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.14")
|
||||
CHUNK_GEN,
|
||||
/**
|
||||
* When a creature spawns from a spawner
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class EntityCombustByBlockEvent extends EntityCombustEvent {
|
||||
private final Block combuster;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.21")
|
||||
public EntityCombustByBlockEvent(@Nullable final Block combuster, @NotNull final Entity combustee, final int duration) {
|
||||
this(combuster, combustee, (float) duration);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class EntityCombustByEntityEvent extends EntityCombustEvent {
|
||||
private final Entity combuster;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.21")
|
||||
public EntityCombustByEntityEvent(@NotNull final Entity combuster, @NotNull final Entity combustee, final int duration) {
|
||||
this(combuster, combustee, (float) duration);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
private float duration;
|
||||
private boolean cancel;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.21")
|
||||
public EntityCombustEvent(@NotNull final Entity combustee, final int duration) {
|
||||
this(combustee, (float) duration);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
* @see #setDuration(float)
|
||||
* @deprecated duration is now a float
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
@Deprecated(since = "1.21", forRemoval = true)
|
||||
public void setDuration(int duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*
|
||||
* @deprecated Use {@link PortalCreateEvent}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.14.1")
|
||||
public class EntityCreatePortalEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final List<BlockState> blocks;
|
||||
|
||||
@@ -17,7 +17,7 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent {
|
||||
private final Block damager;
|
||||
private final BlockState damagerState;
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@Deprecated(since = "1.20.4", forRemoval = true)
|
||||
public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) {
|
||||
this(damager, (damager != null) ? damager.getState() : null, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), damage);
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent {
|
||||
this.damagerState = damagerState;
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@Deprecated(since = "1.20.4", forRemoval = true)
|
||||
public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
|
||||
this(damager, (damager != null) ? damager.getState() : null, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class EntityDamageByEntityEvent extends EntityDamageEvent {
|
||||
private final Entity damager;
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@Deprecated(since = "1.20.4", forRemoval = true)
|
||||
public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) {
|
||||
this(damager, damagee, cause, DamageSource.builder(DamageType.GENERIC).withCausingEntity(damager).withDirectEntity(damager).build(), damage);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent {
|
||||
this.damager = damager;
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@Deprecated(since = "1.20.4", forRemoval = true)
|
||||
public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
|
||||
this(damager, damagee, cause, DamageSource.builder(DamageType.GENERIC).withCausingEntity(damager).withDirectEntity(damager).build(), modifiers, modifierFunctions);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
||||
private final DamageCause cause;
|
||||
private final DamageSource damageSource;
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@Deprecated(since = "1.20.4", forRemoval = true)
|
||||
public EntityDamageEvent(@NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) {
|
||||
this(damagee, cause, DamageSource.builder(DamageType.GENERIC).build(), damage);
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
||||
this(damagee, cause, damageSource, new EnumMap<DamageModifier, Double>(ImmutableMap.of(DamageModifier.BASE, damage)), new EnumMap<DamageModifier, Function<? super Double, Double>>(ImmutableMap.of(DamageModifier.BASE, ZERO)));
|
||||
}
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
@Deprecated(since = "1.20.4", forRemoval = true)
|
||||
public EntityDamageEvent(@NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
|
||||
this(damagee, cause, DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions);
|
||||
}
|
||||
@@ -240,7 +240,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
||||
* removed very soon in a subsequent release. Please see
|
||||
* <a href="https://www.spigotmc.org/threads/194446/">this thread</a> for more information.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.12")
|
||||
public enum DamageModifier {
|
||||
/**
|
||||
* This represents the amount of damage being done, also known as the
|
||||
|
||||
@@ -34,7 +34,7 @@ public class EntityPlaceEvent extends EntityEvent implements Cancellable {
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class EntityResurrectEvent extends EntityEvent implements Cancellable {
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
public EntityResurrectEvent(@NotNull LivingEntity what) {
|
||||
this(what, null);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public class EntityShootBowEvent extends EntityEvent implements Cancellable {
|
||||
* @param consumeItem whether or not to consume the item
|
||||
* @deprecated not currently functional
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.5")
|
||||
public void setConsumeItem(boolean consumeItem) {
|
||||
this.consumeItem = consumeItem;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
*
|
||||
* @deprecated obsoleted by {@link #TARGET_ATTACKED_NEARBY_ENTITY}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13")
|
||||
PIG_ZOMBIE_TARGET,
|
||||
/**
|
||||
* When the target is forgotten for whatever reason.
|
||||
|
||||
@@ -16,7 +16,7 @@ public class ExpBottleEvent extends ProjectileHitEvent {
|
||||
private int exp;
|
||||
private boolean showEffect = true;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.2")
|
||||
public ExpBottleEvent(@NotNull final ThrownExpBottle bottle, final int exp) {
|
||||
this(bottle, null, null, null, exp);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class HorseJumpEvent extends EntityEvent implements Cancellable {
|
||||
* @deprecated horse jumping was moved client side.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.9")
|
||||
public void setCancelled(boolean cancel) {
|
||||
cancelled = cancel;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class HorseJumpEvent extends EntityEvent implements Cancellable {
|
||||
* @param power power of the jump
|
||||
* @deprecated horse jumping was moved client side.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.9")
|
||||
public void setPower(float power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class ItemSpawnEvent extends EntitySpawnEvent {
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13.2")
|
||||
public ItemSpawnEvent(@NotNull final Item spawnee, final Location loc) {
|
||||
this(spawnee);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class LingeringPotionSplashEvent extends ProjectileHitEvent implements Ca
|
||||
private boolean cancelled;
|
||||
private final AreaEffectCloud entity;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.2")
|
||||
public LingeringPotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final AreaEffectCloud entity) {
|
||||
this(potion, null, null, null, entity);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
|
||||
* @deprecated use {@link EntityTransformEvent#getTransformedEntity()}
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13.2")
|
||||
public PigZombie getPigZombie() {
|
||||
return pigzombie;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class PlayerLeashEntityEvent extends Event implements Cancellable {
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
public PlayerLeashEntityEvent(@NotNull Entity what, @NotNull Entity leashHolder, @NotNull Player leasher) {
|
||||
this(what, leashHolder, leasher, EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class PotionSplashEvent extends ProjectileHitEvent implements Cancellable
|
||||
private boolean cancelled;
|
||||
private final Map<LivingEntity, Double> affectedEntities;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.2")
|
||||
public PotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final Map<LivingEntity, Double> affectedEntities) {
|
||||
this(potion, null, null, null, affectedEntities);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class SheepDyeWoolEvent extends EntityEvent implements Cancellable {
|
||||
private DyeColor color;
|
||||
private final Player player;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.17.1")
|
||||
public SheepDyeWoolEvent(@NotNull final Sheep sheep, @NotNull final DyeColor color) {
|
||||
this(sheep, color, null);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class VillagerReplenishTradeEvent extends EntityEvent implements Cancella
|
||||
* @deprecated MC 1.14 has changed how villagers restock their trades. Use
|
||||
* {@link MerchantRecipe#getUses()}.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.18.1")
|
||||
public int getBonus() {
|
||||
return recipe.getUses();
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class VillagerReplenishTradeEvent extends EntityEvent implements Cancella
|
||||
* @deprecated MC 1.14 has changed how villagers restock their trades. This
|
||||
* has no effect anymore.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.18.1")
|
||||
public void setBonus(int bonus) {
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public class HangingPlaceEvent extends HangingEvent implements Cancellable {
|
||||
private final EquipmentSlot hand;
|
||||
private final ItemStack itemStack;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.17.1")
|
||||
public HangingPlaceEvent(@NotNull final Hanging hanging, @Nullable final Player player, @NotNull final Block block, @NotNull final BlockFace blockFace, @Nullable final EquipmentSlot hand) {
|
||||
this(hanging, player, block, blockFace, hand, null);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class InventoryClickEvent extends InventoryInteractEvent {
|
||||
* create inconsistencies between the Player and the server, and to
|
||||
* make unexpected changes in the behavior of the clicked Inventory.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.5.2")
|
||||
public void setCursor(@Nullable ItemStack stack) {
|
||||
getView().setCursor(stack);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ public enum InventoryType {
|
||||
*
|
||||
* @deprecated use {@link #SMITHING}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.1")
|
||||
SMITHING_NEW(4, "Upgrade Gear", MenuType.SMITHING),
|
||||
;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*
|
||||
* @deprecated chat previews have been removed
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.1")
|
||||
@Warning(false)
|
||||
public class AsyncPlayerChatPreviewEvent extends AsyncPlayerChatEvent {
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@ public class AsyncPlayerPreLoginEvent extends Event {
|
||||
private final UUID uniqueId;
|
||||
private final boolean transferred;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.7.5")
|
||||
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress) {
|
||||
this(name, ipAddress, null);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.5")
|
||||
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final UUID uniqueId) {
|
||||
this(name, ipAddress, uniqueId, false);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
|
||||
* @deprecated This method uses a deprecated enum from {@link
|
||||
* PlayerPreLoginEvent}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.3.2")
|
||||
@NotNull
|
||||
public PlayerPreLoginEvent.Result getResult() {
|
||||
return result == null ? null : result.old();
|
||||
@@ -81,7 +81,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
|
||||
* @deprecated This method uses a deprecated enum from {@link
|
||||
* PlayerPreLoginEvent}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.3.2")
|
||||
public void setResult(@NotNull final PlayerPreLoginEvent.Result result) {
|
||||
this.result = result == null ? null : Result.valueOf(result.name());
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
|
||||
* @deprecated This method uses a deprecated enum from {@link
|
||||
* PlayerPreLoginEvent}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.3.2")
|
||||
public void disallow(@NotNull final PlayerPreLoginEvent.Result result, @NotNull final String message) {
|
||||
this.result = result == null ? null : Result.valueOf(result.name());
|
||||
this.message = message;
|
||||
@@ -217,7 +217,7 @@ public class AsyncPlayerPreLoginEvent extends Event {
|
||||
*/
|
||||
KICK_OTHER;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.3.2")
|
||||
@NotNull
|
||||
private PlayerPreLoginEvent.Result old() {
|
||||
return PlayerPreLoginEvent.Result.valueOf(name());
|
||||
|
||||
@@ -13,7 +13,7 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||
private final PlayerAnimationType animationType;
|
||||
private boolean isCancelled = false;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19")
|
||||
public PlayerAnimationEvent(@NotNull final Player player) {
|
||||
this(player, PlayerAnimationType.ARM_SWING);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class PlayerArmorStandManipulateEvent extends PlayerInteractEntityEvent {
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
|
||||
this.bedEnterResult = bedEnterResult;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13.2")
|
||||
public PlayerBedEnterEvent(@NotNull Player who, @NotNull Block bed) {
|
||||
this(who, bed, BedEnterResult.OK);
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class PlayerBucketEmptyEvent extends PlayerBucketEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.14.4")
|
||||
public PlayerBucketEmptyEvent(@NotNull final Player who, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
super(who, blockClicked, blockFace, bucket, itemInHand);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellab
|
||||
private final Material bucket;
|
||||
private final EquipmentSlot hand;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.14.4")
|
||||
public PlayerBucketEvent(@NotNull final Player who, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
this(who, null, blockClicked.getRelative(blockFace), blockFace, bucket, itemInHand, EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class PlayerBucketFillEvent extends PlayerBucketEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.14.4")
|
||||
public PlayerBucketFillEvent(@NotNull final Player who, @NotNull final Block blockClicked, @NotNull final BlockFace blockFace, @NotNull final Material bucket, @NotNull final ItemStack itemInHand) {
|
||||
super(who, blockClicked, blockFace, bucket, itemInHand);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*
|
||||
* @deprecated Use the more generic {@link PlayerBucketEntityEvent}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.16.5")
|
||||
@Warning(false)
|
||||
public class PlayerBucketFishEvent extends PlayerBucketEntityEvent {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class PlayerBucketFishEvent extends PlayerBucketEntityEvent {
|
||||
* @deprecated Use {@link #getOriginalBucket()}
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.16.5")
|
||||
public ItemStack getWaterBucket() {
|
||||
return getOriginalBucket();
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class PlayerBucketFishEvent extends PlayerBucketEntityEvent {
|
||||
* @deprecated Use {@link #getEntityBucket()}
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.16.5")
|
||||
public ItemStack getFishBucket() {
|
||||
return getEntityBucket();
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* causes delays for chat. {@link AsyncPlayerChatEvent} is the encouraged
|
||||
* alternative for thread safe implementations.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.3.1")
|
||||
@Warning(reason = "Listening to this event forces chat to wait for the main thread, delaying chat messages.")
|
||||
public class PlayerChatEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*
|
||||
* @deprecated This event is no longer fired due to client changes
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13")
|
||||
@Warning(reason = "This event is no longer fired due to client changes")
|
||||
public class PlayerChatTabCompleteEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@@ -127,7 +127,7 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell
|
||||
* guarantee to the effect of viewing or modifying the set.
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.3.1")
|
||||
public Set<Player> getRecipients() {
|
||||
return recipients;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class PlayerEditBookEvent extends PlayerEvent implements Cancellable {
|
||||
* @return the inventory slot number that the book item occupies
|
||||
* @deprecated books may be signed from off hand
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13.1")
|
||||
public int getSlot() {
|
||||
return slot;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class PlayerHarvestBlockEvent extends PlayerEvent implements Cancellable
|
||||
this.itemsHarvested = itemsHarvested;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
public PlayerHarvestBlockEvent(@NotNull Player player, @NotNull Block harvestedBlock, @NotNull List<ItemStack> itemsHarvested) {
|
||||
this(player, harvestedBlock, EquipmentSlot.HAND, itemsHarvested);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
|
||||
* the case of using a firework whilst gliding. Callers should check the
|
||||
* relevant methods individually.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.14")
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return useInteractedBlock() == Result.DENY;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class PlayerItemConsumeEvent extends PlayerEvent implements Cancellable {
|
||||
* @param item the ItemStack being consumed
|
||||
* @deprecated use {@link #PlayerItemConsumeEvent(Player, ItemStack, EquipmentSlot)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
public PlayerItemConsumeEvent(@NotNull final Player player, @NotNull final ItemStack item) {
|
||||
this(player, item, EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class PlayerItemMendEvent extends PlayerEvent implements Cancellable {
|
||||
this.repairAmount = repairAmount;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
public PlayerItemMendEvent(@NotNull Player who, @NotNull ItemStack item, @NotNull ExperienceOrb experienceOrb, int repairAmount) {
|
||||
this(who, item, null, experienceOrb, repairAmount);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* Thrown when a player picks an item up from the ground
|
||||
* @deprecated {@link EntityPickupItemEvent}
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.12")
|
||||
@Warning(false)
|
||||
public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* AsyncPlayerPreLoginEvent} is preferred to keep the secondary threads
|
||||
* asynchronous.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.3.2")
|
||||
@Warning(reason = "This event causes a login thread to synchronize with the main thread")
|
||||
public class PlayerPreLoginEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
@@ -24,7 +24,7 @@ public class PlayerPreLoginEvent extends Event {
|
||||
private final InetAddress ipAddress;
|
||||
private final UUID uniqueId;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.7.5")
|
||||
public PlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress) {
|
||||
this(name, ipAddress, null);
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@ public class PlayerRespawnEvent extends PlayerEvent {
|
||||
private final boolean isAnchorSpawn;
|
||||
private final RespawnReason respawnReason;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.16.1")
|
||||
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn) {
|
||||
this(respawnPlayer, respawnLocation, isBedSpawn, false);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.4")
|
||||
public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn, final boolean isAnchorSpawn) {
|
||||
this(respawnPlayer, respawnLocation, isBedSpawn, false, RespawnReason.PLUGIN);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class PlayerRiptideEvent extends PlayerEvent {
|
||||
this.velocity = velocity;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.4")
|
||||
public PlayerRiptideEvent(@NotNull final Player who, @NotNull final ItemStack item) {
|
||||
this(who, item, new Vector());
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class PlayerShearEntityEvent extends PlayerEvent implements Cancellable {
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.15.2")
|
||||
public PlayerShearEntityEvent(@NotNull final Player who, @NotNull final Entity what) {
|
||||
this(who, what, new ItemStack(Material.SHEARS), EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public class PlayerUnleashEntityEvent extends EntityUnleashEvent implements Canc
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.2")
|
||||
public PlayerUnleashEntityEvent(@NotNull Entity entity, @NotNull Player player) {
|
||||
this(entity, player, EquipmentSlot.HAND);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class BroadcastMessageEvent extends ServerEvent implements Cancellable {
|
||||
private final Set<CommandSender> recipients;
|
||||
private boolean cancelled = false;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.14")
|
||||
public BroadcastMessageEvent(@NotNull String message, @NotNull Set<CommandSender> recipients) {
|
||||
this(false, message, recipients);
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
* @return true if chat preview is enabled, false otherwise
|
||||
* @deprecated chat previews have been removed
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.19.3")
|
||||
public boolean shouldSendChatPreviews() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class LightningStrikeEvent extends WeatherEvent implements Cancellable {
|
||||
private final LightningStrike bolt;
|
||||
private final Cause cause;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13.1")
|
||||
public LightningStrikeEvent(@NotNull final World world, @NotNull final LightningStrike bolt) {
|
||||
this(world, bolt, Cause.UNKNOWN);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class PortalCreateEvent extends WorldEvent implements Cancellable {
|
||||
private final Entity entity;
|
||||
private final CreateReason reason;
|
||||
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.14.1")
|
||||
public PortalCreateEvent(@NotNull final List<BlockState> blocks, @NotNull final World world, @NotNull CreateReason reason) {
|
||||
this(blocks, world, null, reason);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user