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

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

  1. Offline

    petteyg359

    OddLight - Expiring torches
    Version: 0.5
    [​IMG][​IMG]

    A plugin to make torches disappear after a configurable interval.

    Features:
    • 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.

    Todo:
    • Stuff. Tell me.

    Commands:
    /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

    Permissions:
    odd.light.duration
    odd.light.worlds
    odd.light.add
    odd.light.rem

    Download [jar]

    Changelog:
    Show Spoiler

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


    light.txt sample:
    Show Spoiler

    Code:
    #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
    



    [​IMG][​IMG]
     
    Netu likes this.
  2. Offline

    AgentKid

    Any way that you can just turn it into a "off state" redstone torch, then when it gets lit with flint+steel it re-ignites or when it gets broken, it drops a regular torch?
     
  3. Offline

    LRFLEW

    I second this (sort of). Since there is no torch de-activated state, you could use redstone-torch de-activated as the state and have it drop torches (you could or could not have the plugin differentiate between redstone torches and torches).
     
  4. Offline

    petteyg359

    I was thinking to just have it drop a stick as soon as it burned out, but the red torch sounds better. It'll have at least a couple of options.
     
  5. Note: Dropping a stick = bad idea if player isn't around to see it... because it will disappear and de-spawn.
     
  6. Offline

    Joey888joey

    I downloaded this plugin, it would be great, however when I download it and install it and run my server it shows up as loaded in console but there is no light.txt file you speak of and torches do not go out. Help will be appreciated.
     
  7. Offline

    petteyg359

    You have to edit the file manually. Just copy/paste one of the sample lines in the first post. 0.1 doesn't have a default duration, so it might not work without the line in light.txt. 0.2 is almost done, just trying to fix some issues with igniting nearby blocks.
     
  8. Offline

    Joey888joey

    But the thing is, it does not make a folder either, should I make a folder called "OddLight" and put a .txt file in it called "Light.txt" with one line that is "Duration: 5m"
     
  9. Offline

    petteyg359

    It should auto-create the folder "Odd", and inside that, an empty file "light.txt". If it didn't, there should be some security exceptions in your console.
     
  10. Offline

    Joey888joey

    Hmm... Ok well I did not see anything in the console, I just tried making a folder called "Odd" with "light.txt" in it, going to start the server and see if it see my 5m duration.
     
  11. Offline

    petteyg359

    Uploaded 0.2. Torches will be replaced by redstone torches (off) when they burn out, which can be re-lit by coal or flint and steel. Flint and steel will destroy the torch after relighting it for 50% of the duration setting. Coal will relight for 100% of duration and doesn't destroy the torch. Sometimes the "off" redstone torch will turn itself on. I've tried to make it stop, unsuccessfully. Just pretend that the hot coal left on the top of the torch glows sometimes :p
     
  12. Offline

    Joey888joey

    Still, there is no folder made called "Odd" and there is no light.txt. However, I can set the duration in game but the duration does not work - meaning the torches just stay there. Any ideas?
     
  13. Offline

    petteyg359

    Zip your craftbukkit folder and upload it somewhere.
     
  14. Offline

    Joey888joey

    Alright, uploading to Mediafire.

    <Edit by Moderator: Redacted mediafire url>

    Ok There. Check it out tell me what you think.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Dec 14, 2016
  15. Offline

    petteyg359

    Your problem is that you're using Craftbukkit build 493.
     
  16. Offline

    Joey888joey

    Wow, didn't even notice. Well- that may be why half the other plugins aren't working...

    EDIT: Well, I just got the newest build (544) and the plugin still won't work, nevermind that, Not one plugin will load. Here is my console.

    Code:
    Last login: Thu Mar 24 22:45:03 on ttys000
    Joey-Kuklas-iMac:~ joeykukla$ cd /Users/joeykukla/Bukkit\ Server
    Joey-Kuklas-iMac:Bukkit Server joeykukla$ java -Xms1024M -Xmx1024M -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
    22:46:08 [INFO] Starting minecraft server version Beta 1.3
    22:46:08 [INFO] Loading properties
    22:46:08 [INFO] Starting Minecraft server on *:25565
    22:46:08 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-544-g6c6c30a-b556jnks (MC: 1.3)
    22:46:08 [INFO] Preparing level "world1"
    22:46:08 [INFO] Preparing start region
    22:46:09 [SEVERE] Could not load plugins/AntiBuild.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.nijikokun.bukkit.AB.AntiBuild.<init>()
        at java.lang.Class.getConstructor0(Class.java:2706)
        at java.lang.Class.getConstructor(Class.java:1657)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:108)
        ... 8 more
    22:46:09 [SEVERE] Could not load plugins/Authorize.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: com.rena4ka.bukkit.auth.Authorize.<init>()
        at java.lang.Class.getConstructor0(Class.java:2706)
        at java.lang.Class.getConstructor(Class.java:1657)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:108)
        ... 8 more
    22:46:09 [SEVERE] Could not load plugins/Flashlight v1-0-3.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: me.taylorkelly.flashlight.Flashlight.<init>()
        at java.lang.Class.getConstructor0(Class.java:2706)
        at java.lang.Class.getConstructor(Class.java:1657)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:108)
        ... 8 more
    22:46:09 [INFO] LWC    Loading shared objects
    22:46:09 [INFO] LWC    Native library: plugins/LWC/lib/native/Mac/x86_64/libsqlitejdbc.jnilib
    22:46:09 [SEVERE] Could not load plugins/mysql-connector-java-bin.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:60)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 9 more
    22:46:10 [SEVERE] Could not load plugins/Slots.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:60)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 9 more
    22:46:10 [SEVERE] Could not load plugins/sqlite.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:60)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 9 more
    22:46:10 [SEVERE] [PropertiesFile] Unable to find file plugins/uQuest/uQuest_Quests.txt!
    22:46:10 [SEVERE] Could not load plugins/uQuest.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:109)
        ... 8 more
    Caused by: java.lang.NullPointerException
        at hawox.uquest.iProperty.save(iProperty.java:277)
        at hawox.uquest.iProperty.<init>(iProperty.java:51)
        at hawox.uquest.UQuest.<init>(UQuest.java:370)
        ... 13 more
    22:46:10 [INFO] WorldGuard loaded.
    22:46:10 [SEVERE] null (Is it up to date?)
    java.lang.NullPointerException
        at ca.xshade.bukkit.towny.Towny.loadSettings(Towny.java:189)
        at ca.xshade.bukkit.towny.Towny.onLoad(Towny.java:196)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:64)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    22:46:10 [INFO] Done (0.204s)! For help, type "help" or "?"
    >
    
     
  17. 556 is the latest recommended build. It fixes the error your got there.
     
  18. Offline

    petteyg359

    You have 556 (git-Bukkit-0.0.0-544-g6c6c30a-b556jnks). 544 is the count of commits in the git repository. It is less than the build number because bukkit changes trigger craftbukkit builds, but don't count as changes to craftbukkit, so the build number will go up but not the commit count.

    You've either copied some plugins wrong, or have some stupid plugins that download external jars directly to the plugins folder, where CB auto-loads every jar file. They should put dependencies in plugins/lib or something.

    I have no idea what causes the InvalidPluginException on the valid plugins, though.
     
  19. Offline

    Legolas75893

    Severe exception....

    17:07:07 [SEVERE] java.lang.NullPointerException
    17:07:07 [SEVERE] at info.somethingodd.bukkit.OddLight.OddLightTorchDecay.run(OddLightTorchDecay.java:15)
    17:07:07 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)
    17:07:07 [SEVERE] at java.lang.Thread.run(Thread.java:636)

    Version: 556
     
  20. Offline

    petteyg359

    Just uploaded 0.3. Should be fixed.

    Also uploaded 0.4 (untested) for Craftbukkit 561+.
     
  21. Offline

    Legolas75893

    Thanks!

    Could you make the config file have a line that says something like...
    "torch-item-replace=none/blockid"
    None would just make the torch disappear, and blockid would make the torch be replaced by that when burned out.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  22. Offline

    petteyg359

    Testing it now, uploading shortly.

    EDIT: 0.3.1 done. Uploaded. Add
    Code:
    relightable: false
    or
    Code:
    relightable: true
    to plugins/Odd/light.txt to control whether torch just disappears or not after the duration. Add
    Code:
    replacement: lava
    for whack-ness :p

    If you can get to the block with coal or flint & steel, you can still "re-light" it, regardless of what block type it is.

    Looking into Persistence support for next version to save torch states across server restarts.
     
  23. Offline

    Legolas75893

    Please no Persistence xD. Just a suckish plugin, your plugin is AMAZING! You're a fast coder too, and fast to respond to requests. :D Come on my server anytime if you want, we use this :D

    Could you fix the lines not generating in config? Or is that not possible?
     
  24. Offline

    petteyg359

    I could, I just haven't bothered to do it, yet :)
     
  25. Offline

    Legolas75893

    Oh xD. Take your time, I was just asking :p. Thanks for the quick response! Again, LOVE your plugin!

    Adding to list of favorite plugins :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  26. Offline

    valdark

    This looks great.

    Just for clarification. Is this timer configured to update torches across the entire server or is it only affecting torches in loaded chunks?
     
  27. Offline

    petteyg359

    It only affects torches placed while the plugin is running. I don't know whether it will expire torches if a chunk gets unloaded - I might be able to prevent a chunk from unloading while a torch is burning, though.

    I haven't added the extra configuration options to 0.4 for 561+ yet, if you've already updated to RB 600 you'll just have to wait a while :p
     
  28. Offline

    Legolas75893

    Also, does making it so torches just "disappear" work? Like, setting it in the config file so it's air?
     
  29. Offline

    petteyg359

    Just add "relightable: false."

    EDIT: Oops. Had 0.4.1 done and completely forgot to upload it.

    EDIT: Double oops. I didn't really have it done. I got interrupted halfway through and forgot it wasn't done. Fixing now :)
     
  30. Offline

    Legolas75893

    :D Yeah!! Woop, can't wait :p.
     

Share This Page