diff options
author | LukBukkit <luk.bukkit@gmail.com> | 2016-11-26 19:23:20 +0100 |
---|---|---|
committer | LukBukkit <luk.bukkit@gmail.com> | 2016-11-26 19:23:20 +0100 |
commit | 32ad0586ce3c0b83118f5eff4f962b63e456823b (patch) | |
tree | fcc5198ea790b4db4e02714511d970fec5c79edc /src | |
parent | beb39797294b37e7d444d1ad62404f7a43552a2b (diff) | |
download | bukkit-32ad0586ce3c0b83118f5eff4f962b63e456823b.tar bukkit-32ad0586ce3c0b83118f5eff4f962b63e456823b.tar.gz bukkit-32ad0586ce3c0b83118f5eff4f962b63e456823b.tar.lz bukkit-32ad0586ce3c0b83118f5eff4f962b63e456823b.tar.xz bukkit-32ad0586ce3c0b83118f5eff4f962b63e456823b.zip |
Added method for spawning a falling block with the BlockData
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/World.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 8dd254aa..02cad41c 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -13,6 +13,7 @@ import org.bukkit.block.Block; import org.bukkit.entity.*; import org.bukkit.generator.BlockPopulator; import org.bukkit.inventory.ItemStack; +import org.bukkit.material.MaterialData; import org.bukkit.metadata.Metadatable; import org.bukkit.plugin.messaging.PluginMessageRecipient; import org.bukkit.util.Vector; @@ -709,6 +710,22 @@ public interface World extends PluginMessageRecipient, Metadatable { * material.isBlock()}. The Material may not be air. * * @param location The {@link Location} to spawn the FallingBlock + * @param data The block data + * @return The spawned {@link FallingBlock} instance + * @throws IllegalArgumentException if {@link Location} or {@link + * MaterialData} are null or {@link Material} of the {@link MaterialData} is not a block + */ + public FallingBlock spawnFallingBlock(Location location, MaterialData data) throws IllegalArgumentException; + + /** + * Spawn a {@link FallingBlock} entity at the given {@link Location} of + * the specified {@link Material}. The material dictates what is falling. + * When the FallingBlock hits the ground, it will place that block. + * <p> + * The Material must be a block type, check with {@link Material#isBlock() + * material.isBlock()}. The Material may not be air. + * + * @param location The {@link Location} to spawn the FallingBlock * @param material The block {@link Material} type * @param data The block data * @return The spawned {@link FallingBlock} instance |