geforkt von Mirrors/Paper
Added method for spawning a falling block with the BlockData
By: LukBukkit <luk.bukkit@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
0069e6122a
Commit
c6077651a7
@ -52,6 +52,7 @@ import org.bukkit.event.world.SpawnChangeEvent;
|
|||||||
import org.bukkit.generator.BlockPopulator;
|
import org.bukkit.generator.BlockPopulator;
|
||||||
import org.bukkit.generator.ChunkGenerator;
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.material.MaterialData;
|
||||||
import org.bukkit.metadata.MetadataValue;
|
import org.bukkit.metadata.MetadataValue;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.messaging.StandardMessenger;
|
import org.bukkit.plugin.messaging.StandardMessenger;
|
||||||
@ -852,6 +853,12 @@ public class CraftWorld implements World {
|
|||||||
return spawn(location, clazz, SpawnReason.CUSTOM);
|
return spawn(location, clazz, SpawnReason.CUSTOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FallingBlock spawnFallingBlock(Location location, MaterialData data) throws IllegalArgumentException {
|
||||||
|
Validate.notNull(data, "MaterialData cannot be null");
|
||||||
|
return spawnFallingBlock(location, data.getItemType(), data.getData());
|
||||||
|
}
|
||||||
|
|
||||||
public FallingBlock spawnFallingBlock(Location location, org.bukkit.Material material, byte data) throws IllegalArgumentException {
|
public FallingBlock spawnFallingBlock(Location location, org.bukkit.Material material, byte data) throws IllegalArgumentException {
|
||||||
Validate.notNull(location, "Location cannot be null");
|
Validate.notNull(location, "Location cannot be null");
|
||||||
Validate.notNull(material, "Material cannot be null");
|
Validate.notNull(material, "Material cannot be null");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren