Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void startSpawningGold() {
- if(!isSpawningg) {
- isSpawningg = true;
- sched = Bukkit.getScheduler().scheduleSyncRepeatingTask(Main.getPlugin(Main.class), new Runnable() {
- @Override
- public void run() {
- Location gold1 = new Location(Bukkit.getWorld("world"), 563.5, 101, -652.5);
- Location gold2 = new Location(Bukkit.getWorld("world"), 564.5, 101, -651.5);
- Location gold3 = new Location(Bukkit.getWorld("world"), 562.5, 101, -650.5);
- Location gold4 = new Location(Bukkit.getWorld("world"), 561.5, 101, -652.5);
- Location bronze1 = new Location(Bukkit.getWorld("world"), 564.5, 99, -760.5);
- Location bronze2 = new Location(Bukkit.getWorld("world"), 562.5, 99, -766.5);
- Location bronze3 = new Location(Bukkit.getWorld("world"), 560.5, 99, -536.5);
- Location bronze4 = new Location(Bukkit.getWorld("world"), 558.5, 99, -541.5);
- Location iron1 = new Location(Bukkit.getWorld("world"), 591.5, 99, -543.5);
- Location iron2 = new Location(Bukkit.getWorld("world"), 531.5, 99, -757.5);
- Entity entity = Bukkit.getWorld("world").dropItemNaturally(gold1, new ItemBuilder(Material.GOLD_INGOT).name("§6Gold").build());
- Entity entity2 = Bukkit.getWorld("world").dropItemNaturally(gold2, new ItemBuilder(Material.GOLD_INGOT).name("§6Gold").build());
- Entity entity3 = Bukkit.getWorld("world").dropItemNaturally(gold4, new ItemBuilder(Material.GOLD_INGOT).name("§6Gold").build());
- Entity entity4 = Bukkit.getWorld("world").dropItemNaturally(gold3, new ItemBuilder(Material.GOLD_INGOT).name("§6Gold").build());
- entities.add(entity);
- entities.add(entity2);
- entities.add(entity3);
- entities.add(entity4);
- for(Player all : Bukkit.getOnlinePlayers()) {
- all.sendMessage("ouhf");
- }
- }
- }, 20, 600);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement