diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 37950a625f..b22b8b8855 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -8,7 +8,7 @@ import org.bukkit.util.Vector; import org.bukkit.entity.Creature; import org.bukkit.entity.CreatureType; import org.bukkit.entity.Entity; -import org.bukkit.entity.ItemDrop; +import org.bukkit.entity.Item; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.PoweredMinecart; import org.bukkit.entity.Minecart; @@ -216,7 +216,7 @@ public interface World { * @param item ItemStack to drop * @return ItemDrop entity created as a result of this method */ - public ItemDrop dropItem(Location location, ItemStack item); + public Item dropItem(Location location, ItemStack item); /** * Drops an item at the specified {@link Location} with a random offset @@ -225,7 +225,7 @@ public interface World { * @param item ItemStack to drop * @return ItemDrop entity created as a result of this method */ - public ItemDrop dropItemNaturally(Location location, ItemStack item); + public Item dropItemNaturally(Location location, ItemStack item); /** * Creates an {@link Arrow} entity at the given {@link Location} diff --git a/paper-api/src/main/java/org/bukkit/block/Block.java b/paper-api/src/main/java/org/bukkit/block/Block.java index fb02f36215..71c91ac499 100644 --- a/paper-api/src/main/java/org/bukkit/block/Block.java +++ b/paper-api/src/main/java/org/bukkit/block/Block.java @@ -201,4 +201,6 @@ public interface Block { * @return */ boolean isBlockIndirectlyPowered(); + + public byte getRawData(); } diff --git a/paper-api/src/main/java/org/bukkit/block/BlockState.java b/paper-api/src/main/java/org/bukkit/block/BlockState.java index 5d59d7a584..c4a4c16fa6 100644 --- a/paper-api/src/main/java/org/bukkit/block/BlockState.java +++ b/paper-api/src/main/java/org/bukkit/block/BlockState.java @@ -104,7 +104,7 @@ public interface BlockState { * * @param type Type-Id to change this block to */ - void setTypeId(int type); + boolean setTypeId(int type); /** * Attempts to update the block represented by this state, setting it to the @@ -135,4 +135,6 @@ public interface BlockState { * @return true if the update was successful, otherwise false */ boolean update(boolean force); + + public byte getRawData(); } diff --git a/paper-api/src/main/java/org/bukkit/entity/ItemDrop.java b/paper-api/src/main/java/org/bukkit/entity/ItemDrop.java deleted file mode 100644 index 33a9629142..0000000000 --- a/paper-api/src/main/java/org/bukkit/entity/ItemDrop.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.bukkit.entity; - -import org.bukkit.inventory.ItemStack; - -/** - * Represents a dropped item. - * - * @author sk89q - */ -public interface ItemDrop extends Entity { - /** - * Gets the item stack contained in this ItemDrop - * - * @return ItemStack of the contents of this drop - */ - public ItemStack getItemStack(); - - - /** - * sets the item stack contained in this ItemDrop - * - * @param items New contents of this drop - */ - public void setItemStack(ItemStack items); -} diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java index 4792b03c6c..1d957fc59c 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java @@ -1,6 +1,6 @@ package org.bukkit.event.player; -import org.bukkit.entity.ItemDrop; +import org.bukkit.entity.Item; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; @@ -9,10 +9,10 @@ import org.bukkit.event.Event; * Thrown when a player drops an item from their inventory */ public class PlayerDropItemEvent extends PlayerEvent implements Cancellable { - private final ItemDrop drop; + private final Item drop; private boolean cancel = false; - public PlayerDropItemEvent(final Player player, final ItemDrop drop) { + public PlayerDropItemEvent(final Player player, final Item drop) { super(Event.Type.PLAYER_DROP_ITEM, player); this.drop = drop; } @@ -22,7 +22,7 @@ public class PlayerDropItemEvent extends PlayerEvent implements Cancellable { * * @return ItemDrop */ - public ItemDrop getItemDrop() { + public Item getItemDrop() { return drop; }