Advertisement
Guest User

Untitled

a guest
Mar 14th, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.80 KB | None | 0 0
  1. public static void startSpawningGold() {
  2.         if(!isSpawningg) {
  3.         isSpawningg = true;
  4.             sched = Bukkit.getScheduler().scheduleSyncRepeatingTask(Main.getPlugin(Main.class), new Runnable() {
  5.            
  6.  
  7.                
  8.             @Override
  9.             public void run() {
  10.                
  11.                 Location gold1 = new Location(Bukkit.getWorld("world"), 563.5, 101, -652.5);
  12.                 Location gold2 = new Location(Bukkit.getWorld("world"), 564.5, 101, -651.5);
  13.                 Location gold3 = new Location(Bukkit.getWorld("world"), 562.5, 101, -650.5);
  14.                 Location gold4 = new Location(Bukkit.getWorld("world"), 561.5, 101, -652.5);
  15.                 Location bronze1 = new Location(Bukkit.getWorld("world"), 564.5, 99, -760.5);
  16.                 Location bronze2 = new Location(Bukkit.getWorld("world"), 562.5, 99, -766.5);
  17.                 Location bronze3 = new Location(Bukkit.getWorld("world"), 560.5, 99, -536.5);
  18.                 Location bronze4 = new Location(Bukkit.getWorld("world"), 558.5, 99, -541.5);
  19.                 Location iron1 = new Location(Bukkit.getWorld("world"), 591.5, 99, -543.5);
  20.                 Location iron2 = new Location(Bukkit.getWorld("world"), 531.5, 99, -757.5);
  21.                
  22.                 Entity entity = Bukkit.getWorld("world").dropItemNaturally(gold1, new ItemBuilder(Material.GOLD_INGOT).name("§6Gold").build());
  23.                 Entity entity2 = Bukkit.getWorld("world").dropItemNaturally(gold2, new ItemBuilder(Material.GOLD_INGOT).name("§6Gold").build());
  24.                 Entity entity3 = Bukkit.getWorld("world").dropItemNaturally(gold4, new ItemBuilder(Material.GOLD_INGOT).name("§6Gold").build());
  25.                 Entity entity4 = Bukkit.getWorld("world").dropItemNaturally(gold3, new ItemBuilder(Material.GOLD_INGOT).name("§6Gold").build());
  26.                 entities.add(entity);
  27.                 entities.add(entity2);
  28.                 entities.add(entity3);
  29.                 entities.add(entity4);
  30.                 for(Player all : Bukkit.getOnlinePlayers()) {
  31.                     all.sendMessage("ouhf");
  32.                 }
  33.             }
  34.         }, 20, 600);
  35.         }
  36.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement