Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. //VULKAN
  2. ArrayList<Item> arrayitems = new ArrayList<Item>();
  3.  
  4. //VULKAN
  5. Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
  6.  
  7. @Override
  8. public void run() {
  9.  
  10. Location vulk1 = new Location(Bukkit.getWorld("world"), 13.5, 79.5, 328.5);
  11.  
  12. for(Player p : Bukkit.getOnlinePlayers()) {
  13.  
  14. p.spawnParticle(Particle.SMOKE_LARGE ,(float) vulk1.getX(), (float) vulk1.getY(), (float) vulk1.getZ(), 7,0.6,0.6,0.6,0);
  15. p.spawnParticle(Particle.FLAME ,(float) vulk1.getX(), (float) vulk1.getY(), (float) vulk1.getZ(), 2,0.35,0.35,0.35,0);
  16. p.spawnParticle(Particle.LAVA ,(float) vulk1.getX(), (float) vulk1.getY(), (float) vulk1.getZ(), 1,0.35,0.35,0.35,0);
  17. p.spawnParticle(Particle.DRIP_LAVA ,(float) vulk1.getX(), (float) vulk1.getY(), (float) vulk1.getZ(), 5,0.45,0.45,0.45,0);
  18.  
  19. }
  20.  
  21. for(Item item : arrayitems) {
  22.  
  23. if(!item.isOnGround()) {
  24. for(Player p : Bukkit.getOnlinePlayers()) {
  25.  
  26. p.spawnParticle(Particle.FLAME,(float) item.getLocation().getX(), (float) item.getLocation().getY(), (float) item.getLocation().getZ(), 1,0.05,0.05,0.05,0);
  27. p.spawnParticle(Particle.CLOUD,(float) item.getLocation().getX(), (float) item.getLocation().getY(), (float) item.getLocation().getZ(), 1,0.05,0.05,0.05,0);
  28. p.spawnParticle(Particle.LAVA,(float) item.getLocation().getX(), (float) item.getLocation().getY(), (float) item.getLocation().getZ(), 1,0.05,0.05,0.05,0);
  29.  
  30. }
  31. }
  32.  
  33. }
  34.  
  35.  
  36. }
  37.  
  38. }, 0, 2);
  39.  
  40.  
  41. //VULKAN
  42. @EventHandler
  43. public void onpickup1(PlayerPickupItemEvent e) {
  44.  
  45. if(arrayitems.contains(e.getItem())) {
  46. arrayitems.remove(e.getItem());
  47. }
  48.  
  49. }
  50.  
  51. //VULKAN
  52. @EventHandler
  53. public void onklick1(PlayerInteractEvent e) {
  54.  
  55. if(e.getAction() == e.getAction().RIGHT_CLICK_BLOCK) {
  56. if(e.getClickedBlock().getType() == Material.EMERALD_BLOCK) {
  57.  
  58. Location loc = new Location(Bukkit.getWorld("world"), 13.5, 79.5, 328.5);
  59. ItemStack is = new ItemStack(Material.DIAMOND);
  60.  
  61. Item item1 = Bukkit.getWorld("world").dropItemNaturally(loc, is);
  62. item1.setVelocity(item1.getVelocity().multiply(4));
  63. arrayitems.add(item1);
  64.  
  65. for(Player p : Bukkit.getOnlinePlayers()) {
  66.  
  67. p.spawnParticle(Particle.EXPLOSION_NORMAL,(float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 15,1,1,1,0);
  68. p.spawnParticle(Particle.EXPLOSION_LARGE,(float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 2,0.05,0.05,0.05,0);
  69. p.spawnParticle(Particle.LAVA,(float) loc.getX(), (float) loc.getY(), (float) loc.getZ(), 5,1.3,1.3,1.3,0);
  70.  
  71. }
  72. }
  73. }
  74.  
  75.  
  76. if(e.getAction() == e.getAction().RIGHT_CLICK_BLOCK) {
  77. if(e.getClickedBlock().getType() == Material.STONE) {
  78.  
  79. Location loc = e.getClickedBlock().getLocation();
  80. loc.add(0.5, 0.1, 0.5);
  81. Bukkit.getWorld("world").spawnFallingBlock(loc, e.getClickedBlock().getBlockData());
  82.  
  83. }
  84. }
  85.  
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement