Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // How fast fuel is consumed.
- @EventHandler
- public void onFurnaceBurn(FurnaceBurnEvent e) {
- Furnace furnace = (Furnace) e.getBlock().getState();
- FileConfiguration cfg = plugin.getConfig();
- String furnLoc = "furnaces." + furnace.getWorld().getName() + "," + furnace.getX() + "," + furnace.getY() + ","
- + furnace.getZ();
- if (cfg.contains(furnLoc)) {
- int storedModifier = cfg.getInt(furnLoc+".coal");
- int configModifier = cfg.getInt("modifers.burntime");
- int oldBurn = e.getBurnTime();
- short burnTime = 200;
- Bukkit.broadcastMessage("Furn: " + furnLoc + "START BT: " + oldBurn);
- furnace.setBurnTime(burnTime);
- furnace.update();
- Bukkit.broadcastMessage("Furn: " + furnLoc + ChatColor.YELLOW + "New BT: " + burnTime);
- }
- else
- Bukkit.broadcastMessage("Furn: " + furnLoc + "Current BT: " + e.getBurnTime());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement