Guest User

Untitled

a guest
Jun 25th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Main plugin;
  2.  
  3. public OreRegen(Main instance)
  4. {
  5. this.plugin = instance;
  6. }
  7.  
  8. HashMap<Block, Location> blocky = new HashMap<Block, Location>();
  9.  
  10. public void onBlockBreak(BlockBreakEvent event){
  11.  
  12. final Block block = event.getBlock();
  13. final Location loc = block.getLocation();
  14.  
  15. if(block.getType().toString().contains("ORE")){
  16. blocky.put(block, loc);
  17.  
  18. plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
  19.  
  20. public void run() {
  21. // right here is where I want to replace the block with what it was
  22.  
  23. }
  24. }, 60L);
Add Comment
Please, Sign In to add comment