[INACTIVE][MECH] OddLight 0.5.2 - Expiring Torches [561-684]

Discussion in 'Inactive/Unsupported Plugins' started by petteyg359, Mar 21, 2011.

  1. Offline


    OddLight - Expiring torches
    Version: 0.5

    A plugin to make torches disappear after a configurable interval.

    • Make torches expire after configurable number of seconds or minutes
    • Torches can be re-lit with flint and steel or coal
      • Flint and steel relights torch for 50% duration and destroys torch.
      • Coal relights torch for 100% duration.

    • Stuff. Tell me.

    /oddlight duration [time] - prints or sets duration
    /oddlight worlds [world1 world2 ... world#] - prints or sets worlds
    /oddlight add <world> - adds world
    /oddlight del <world> - removes world


    Download [jar]

    Show Spoiler

    Took exception to a pointing null​
    Added Netherrack to light torches permanently​
    Additional options, tested for CB 602​
    Initial build for Craftbukkit 561+ (using PLAYER_INTERACT)​
    Fixed NPE​
    Torches change to redstone torch after expiration
    Torches can be re-lit with lighter or coal​
    Initial release​

    light.txt sample:
    Show Spoiler

    #torches last for 1 hour
    duration: 1h
    #torches last for 2 hours
    duration: 7200
    #torches last for 3 hours
    duration: 180m
    #just samples to show that you can use #m or #h for minutes and hours, only one of them should be in config
    #torches are relightable with coal or lighter
    relightable: true
    #torches change to off redstone torch at expiration
    replacement: redstone_torch_off
    #whack-ness - if you want to give good players glowstone and grief griefers when they go mining, set a very short duration along with this :)
    replacement: lava
    #list of worlds to enable plugin on (no spaces between worlds, comma delimited)
    worlds: world1,world2,world3

    Netu likes this.
  2. Offline


    0.5 "done". Not fully tested (only 602 yet). Adds new configuration options.
  3. Offline


    Throwing lots of errors, and spamming chat with "Data:2" and the like. Anyone else? Using 602.
  4. Offline


    Oops. I may've uploaded the wrong one.

    EDIT: Fixed. Re-download.
    Netu likes this.
  5. Offline


    HAH! Brilliant.
  6. Is a piece of coal used up when relighting a torch?
  7. Offline


    Yes, if you use coal to do so.
  8. Would it be possible and would you be willing to make this configurable? I would like to have torches go out periodically but be free to relight.
  9. Offline


    With great configurability comes great responsibility! Your feature is being implemented.
  10. Offline


    ...This one is out there. And probably not within the scope of your plugin. So just say "No, dude, that's dumb" if, well, it is.

    What if a user places 4 torches around a wood block? To make a "lantern" as it were. Or, if possible, placed torches onto a glass block (I know this isn't possible with default Minecraft). Then, when the user does that, it would become glowstone. Or something.

    I don't know. Just throwing out another "more permanent" solution. My users hate me for having added this plugin, but goodness I love it! Survival Minecraft should be just that. [pig]
  11. Offline


    The current version allows using netherrack to make a torch permanent already, but since I'm reworking the whole thing anyway, I might as well at least try to add your idea :)
    Netu likes this.
  12. Offline


    I didn't know about the netherrack thing, woops! Thanks for being willing to add it; if it becomes an impossibility, no hard feelings!

    Thanks a lot for listening--you're a great developer!
  13. Offline


    Sorry this is taking so long to update, my coding muse went on vacation or something. I haven't abandoned this, though :)
  14. Offline


    With bated breath we wait!
  15. Offline


    Thanks for this plugin, i am hosting a zombie survival server and having this plugin makes it 100x more scary. So even if people place down torches, they eventually wont be bright enough to stop zombies from spawning. This will stop my whole world being filled with torches (hopefully).

    However i have a problem, i saw in the console that there was a GetAllTorches variable, i am guessing this is to count all of the torches around you and include them in the process, yet i am standing infront of 10 torches and they seem to refuse to burn out. I have the timer set to 60 seconds for testing purposes, and still nothing. They was placed before the plugin was put in, should this matter?

    also does this affect jack'o'lanterns?? They seem to turn off after a while, not sure if this is built in or part of your plugin.

    CB: 670
    Oddlight: 0.5.2

    Keep up the good work!!
    Just done some more testing, it appears new torches that are placed are affected, but ones before the plugin was added are not. Would it be possible for the plugin to affect all torches, wether they was placed prior to the plugin or not?
  16. Offline


    GetAllTorches was to make it load all torches as each chunk loads, and set them to expire. The code didn't work very well, though, and it meant that perma-lit torches (netherrack) would cease to be permanent as soon as the server restarted. It gets hard-coded to false, so ignore it for now. I'll be fixing that in the next version.
  17. Offline


    Ahh ok, i managed to get the setting to true, but i have turn it to false again. Yet again an amazing plugin :D (most people on my server dont like the fact torches expire now, yet i love the added sense of scaryness to the world! Perfect for a zombie survival)
  18. Offline


    I have run this plugin for about a week now with the setting set to 12 hours. So far none of the torches have disappeared.

    Is there any way to add in a feature when a person logs out any torch they placed disappears?
  19. Offline


    Has the server been restarted in that time? The plugin doesn't keep track of torches across restarts (yet), so if you restart the server (or do /reload) none of the torches are tracked anymore, until new ones are placed, which are again lost if you restart again.
  20. Offline


    lol ok then the plugin is useless for what I need. Thanks for the info.
  21. Offline


    Is there anyway you could change this feature into having all torch placements put into a sqlite database and then read from there if any are in the chunks being loaded by the players?
  22. Offline


    Yep, as soon as I figure out the most effective way to use the Ebean stuff.
    captainbinary likes this.
  23. Offline


    Love bump<3 Great plugin!
  24. Offline


    Rad good luck with it :)
  25. Offline


    Love the idea (although I put the expiry time at 2 weeks so we don't need to replace torches that often) but had a problem where if you place a torch on top of a block and dig out the block the torch stays floating.
  26. Offline


    Multi-world seems buggy. I wanted this to only be active on my Trin world and torches on the main world keep burning out in what appears to be no logical pattern.
  27. Offline


    Confirmed. Will work on that, too.
    I hadn't actually tested it on more than one world, but it's supposed to only track blocks placed on the worlds set in the config.
  28. Offline


    Yeah, it didn't. It actually only tracked in the main world, and then not all torches, just some.
  29. Offline


    +10, Great idea of an addon. I don't use it but still I think it's a great idea :). No sarcasm.
  30. Offline


    have torch placing relay a configurable message. it would help me let my server know how long the torches last.
  31. Offline


    I am not sure if other people are having this problem, but my players can just hit a torch and it will respawn immediately as a permanent torch. I am on CB 677

Share This Page