Advertisement
Guest User

Untitled

a guest
Jan 5th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1.     // How fast fuel is consumed.
  2.     @EventHandler
  3.     public void onFurnaceBurn(FurnaceBurnEvent e) {
  4.         Furnace furnace = (Furnace) e.getBlock().getState();
  5.         FileConfiguration cfg = plugin.getConfig();
  6.  
  7.         String furnLoc = "furnaces." + furnace.getWorld().getName() + "," + furnace.getX() + "," + furnace.getY() + ","
  8.                 + furnace.getZ();
  9.  
  10.         if (cfg.contains(furnLoc)) {
  11.             int storedModifier = cfg.getInt(furnLoc+".coal");
  12.             int configModifier = cfg.getInt("modifers.burntime");
  13.             int oldBurn = e.getBurnTime();
  14.  
  15.             short burnTime = 200;
  16.  
  17.             Bukkit.broadcastMessage("Furn: " + furnLoc + "START BT: " + oldBurn);
  18.  
  19.             furnace.setBurnTime(burnTime);
  20.             furnace.update();
  21.             Bukkit.broadcastMessage("Furn: " + furnLoc + ChatColor.YELLOW + "New BT: " + burnTime);
  22.         }
  23.         else
  24.             Bukkit.broadcastMessage("Furn: " + furnLoc + "Current BT: " + e.getBurnTime());
  25.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement