#1082: Add "since" to Deprecation annotations
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user