Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.banbeucmas.minehotbedwar.Runnables;
- import me.banbeucmas.minehotbedwar.FileManagement.AllTeamPlayField;
- import me.banbeucmas.minehotbedwar.FileManagement.GeneratorType;
- import me.banbeucmas.minehotbedwar.Main;
- import org.bukkit.Location;
- import org.bukkit.World;
- import org.bukkit.configuration.file.FileConfiguration;
- import org.bukkit.inventory.ItemStack;
- import org.bukkit.scheduler.BukkitRunnable;
- /**
- * Created by Banbeucams on 6/27/2017.
- */
- public class GeneratorRunnable extends BukkitRunnable{
- private Main pl = Main.getPlugin();
- private FileConfiguration config = pl.getConfig();
- private int counter = 0;
- @Override
- public void run() {
- for(GeneratorType gen : GeneratorType.values()){
- if(counter % gen.getDuration() == 0){
- for(Location loc : AllTeamPlayField.getGeneratorLocMap().get(gen)){
- System.out.println(loc.getBlockY());
- World w = loc.getWorld();
- ItemStack item = new ItemStack(gen.getMaterial(), 1);
- w.dropItem(loc, item);
- }
- }
- }
- counter++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement