Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //VULKAN
- ArrayList<Item> arrayitems = new ArrayList<Item>();
- //VULKAN
- Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
- @Override
- public void run() {
- Location vulk1 = new Location(Bukkit.getWorld("world"), 13.5, 79.5, 328.5);
- for(Player p : Bukkit.getOnlinePlayers()) {
- p.spawnParticle(Particle.SMOKE_LARGE ,(float) vulk1.getX(), (float) vulk1.getY(), (float) vulk1.getZ(), 7,0.6,0.6,0.6,0);
- p.spawnParticle(Particle.FLAME ,(float) vulk1.getX(), (float) vulk1.getY(), (float) vulk1.getZ(), 2,0.35,0.35,0.35,0);
- p.spawnParticle(Particle.LAVA ,(float) vulk1.getX(), (float) vulk1.getY(), (float) vulk1.getZ(), 1,0.35,0.35,0.35,0);
- p.spawnParticle(Particle.DRIP_LAVA ,(float) vulk1.getX(), (float) vulk1.getY(), (float) vulk1.getZ(), 5,0.45,0.45,0.45,0);
- }
- for(Item item : arrayitems) {
- if(!item.isOnGround()) {
- for(Player p : Bukkit.getOnlinePlayers()) {
- p.spawnParticle(Particle.FLAME,(float) item.getLocation().getX(), (float) item.getLocation().getY(), (float) item.getLocation().getZ(), 1,0.05,0.05,0.05,0);
- p.spawnParticle(Particle.CLOUD,(float) item.getLocation().getX(), (float) item.getLocation().getY(), (float) item.getLocation().getZ(), 1,0.05,0.05,0.05,0);
- p.spawnParticle(Particle.LAVA,(float) item.getLocation().getX(), (float) item.getLocation().getY(), (float) item.getLocation().getZ(), 1,0.05,0.05,0.05,0);
- }
- }
- }
- }
- }, 0, 2);
- //VULKAN
- @EventHandler
- public void onpickup1(PlayerPickupItemEvent e) {
- if(arrayitems.contains(e.getItem())) {
- arrayitems.remove(e.getItem());
- }
- }
- //VULKAN
- @EventHandler
- public void onklick1(PlayerInteractEvent e) {
- if(e.getAction() == e.getAction().RIGHT_CLICK_BLOCK) {
- if(e.getClickedBlock().getType() == Material.EMERALD_BLOCK) {
- Location loc = new Location(Bukkit.getWorld("world"), 13.5, 79.5, 328.5);
- ItemStack is = new ItemStack(Material.DIAMOND);
- Item item1 = Bukkit.getWorld("world").dropItemNaturally(loc, is);
- item1.setVelocity(item1.getVelocity().multiply(4));
- arrayitems.add(item1);
- for(Player p : Bukkit.getOnlinePlayers()) {
- p.spawnParticle(Particle.EXPLOSION_NORMAL,(float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 15,1,1,1,0);
- p.spawnParticle(Particle.EXPLOSION_LARGE,(float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 2,0.05,0.05,0.05,0);
- p.spawnParticle(Particle.LAVA,(float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 5,1.3,1.3,1.3,0);
- }
- }
- }
- if(e.getAction() == e.getAction().RIGHT_CLICK_BLOCK) {
- if(e.getClickedBlock().getType() == Material.STONE) {
- Location loc = e.getClickedBlock().getLocation();
- loc.add(0.5, 0.1, 0.5);
- Bukkit.getWorld("world").spawnFallingBlock(loc, e.getClickedBlock().getBlockData());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement