From 68a6f96ea643fc21771410a110a0baf9bdd1a74b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 27 Jul 2011 21:09:07 -0400 Subject: [PATCH] Removed deprecated methods. getNote() that returns a byte has been replaced by getRawNote(). teleportTo(Location) has been replaced by teleport(location). teleportTo(Entity) has been replaced by teleport(Entity). SnowForm event has been replaced by BlockForm event. By: EvilSeph --- .../main/java/org/bukkit/block/NoteBlock.java | 18 ------ .../main/java/org/bukkit/entity/Entity.java | 16 ----- .../src/main/java/org/bukkit/event/Event.java | 6 -- .../org/bukkit/event/block/BlockListener.java | 9 --- .../org/bukkit/event/block/SnowFormEvent.java | 64 ------------------- .../bukkit/plugin/java/JavaPluginLoader.java | 7 -- 6 files changed, 120 deletions(-) delete mode 100644 paper-api/src/main/java/org/bukkit/event/block/SnowFormEvent.java diff --git a/paper-api/src/main/java/org/bukkit/block/NoteBlock.java b/paper-api/src/main/java/org/bukkit/block/NoteBlock.java index de71cb5e18..658dcf13bb 100644 --- a/paper-api/src/main/java/org/bukkit/block/NoteBlock.java +++ b/paper-api/src/main/java/org/bukkit/block/NoteBlock.java @@ -8,15 +8,6 @@ import org.bukkit.Note; */ public interface NoteBlock extends BlockState { - /** - * Gets the note. - * - * @return - * @deprecated use {@link #getRawNote()} instead - */ - @Deprecated - public byte getNote(); - /** * Gets the note. * @@ -24,15 +15,6 @@ public interface NoteBlock extends BlockState { */ public byte getRawNote(); - /** - * Set the note. - * - * @param note - * @deprecated use {@link #setRawNote(byte)} instead - */ - @Deprecated - public void setNote(byte note); - /** * Set the note. * diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index d8c59cc60f..6ae2a782be 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -58,22 +58,6 @@ public interface Entity { */ public boolean teleport(Entity destination); - /** - * Teleports this entity to the given location - * - * @param location New location to teleport this entity to - * @deprecated use {@link #teleport(Location)} - */ - public void teleportTo(Location location); - - /** - * Teleports this entity to the target Entity - * - * @param destination Entity to teleport this entity to - * @deprecated use {@link #teleport(Entity)} - */ - public void teleportTo(Entity destination); - /** * Returns a list of entities within a bounding box defined by x,y,z centered around player * diff --git a/paper-api/src/main/java/org/bukkit/event/Event.java b/paper-api/src/main/java/org/bukkit/event/Event.java index 80e0341856..5aa765f034 100644 --- a/paper-api/src/main/java/org/bukkit/event/Event.java +++ b/paper-api/src/main/java/org/bukkit/event/Event.java @@ -380,12 +380,6 @@ public abstract class Event implements Serializable { * @see org.bukkit.event.block.BlockBreakEvent */ BLOCK_BREAK (Category.BLOCK), - /** - * Called when world attempts to place a snow block during a snowfall - * - * @see org.bukkit.event.block.SnowFormEvent - */ - SNOW_FORM (Category.BLOCK), /** * Called when a block is formed based on world conditions * diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockListener.java b/paper-api/src/main/java/org/bukkit/event/block/BlockListener.java index 1b51b0f207..287a9153c4 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/BlockListener.java +++ b/paper-api/src/main/java/org/bukkit/event/block/BlockListener.java @@ -118,15 +118,6 @@ public class BlockListener implements Listener { */ public void onBlockBreak(BlockBreakEvent event) {} - /** - * Called when a world is attempting to place a block during a snowfall. - * - * @param event Relevant event details - * @deprecated Be prepared to use onBlockForm instead as it will be replacing this event after the RB - */ - @Deprecated - public void onSnowForm(SnowFormEvent event) {} - /** * Called when a block is formed or spreads based on world conditions. * Use {@link BlockSpreadEvent} to catch blocks that actually spread and don't just "randomly" form. diff --git a/paper-api/src/main/java/org/bukkit/event/block/SnowFormEvent.java b/paper-api/src/main/java/org/bukkit/event/block/SnowFormEvent.java deleted file mode 100644 index 7d9ea69d43..0000000000 --- a/paper-api/src/main/java/org/bukkit/event/block/SnowFormEvent.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.bukkit.event.block; - -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.event.Cancellable; - -/** - * Called on snow formed by weather - */ -public class SnowFormEvent extends BlockEvent implements Cancellable { - private Material material; - private byte data; - private boolean cancel; - - public SnowFormEvent(Block block) { - super(Type.SNOW_FORM, block); - this.material = Material.SNOW; - this.cancel = false; - } - - /** - * Gets the material being placed on a block during snowfall - * - * @return the material being placed by a snowfall - */ - public Material getMaterial() { - return material; - } - - /** - * Sets the material to be placed on a block during a snowfall - * - * @param material the material to be placed during a snowfall - */ - public void setMaterial(Material material) { - this.material = material; - } - - /** - * Gets the block data of a block involved in a snowfall - * - * @return the data of the block being placed by a snowfall - */ - public byte getData() { - return data; - } - - /** - * Sets the block data of a block involved in a snowfall - * - * @param data - */ - public void setData(byte data) { - this.data = data; - } - - public boolean isCancelled() { - return cancel; - } - - public void setCancelled(boolean cancel) { - this.cancel = cancel; - } -} diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index e0b3b53e28..1bc795ddc6 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -491,13 +491,6 @@ public final class JavaPluginLoader implements PluginLoader { } }; - case SNOW_FORM: - return new EventExecutor() { - public void execute(Listener listener, Event event) { - ((BlockListener) listener).onSnowForm((SnowFormEvent) event); - } - }; - case BLOCK_FORM: return new EventExecutor() { public void execute(Listener listener, Event event) {