[INACTIVE][INFO] tooDark v2.2.3 - light level interpreter [400+]

Discussion in 'Inactive/Unsupported Plugins' started by ursa_arcadius, Feb 2, 2011.

  1. Offline

    ursa_arcadius

    tooDark - A light level plugin:
    Version: v2.2.3

    Displays and interprets the light level around the player.
    (Especially useful for determining if you cave is lit up enough)
    Use /autolight to automatically place a torch from your inventory on the ground if the light level is below 7.

    --Now supports Permissions--
    You no longer have to have permissions to use this plugin. If you have it installed, permissions will be used. Otherwise all players will have access to all commands. To install permissions please go here.

    --Current Note on Permissions--
    As of when I am writing this permissions 2.1 was not updated to work with the most recent version of CraftBukkit. This means that I did not actually test that this plugin works with permissions but I did test it with GroupManager and it worked fine there. If you experience problems, let me know please.

    Features:
    • Automatically light the ground below you when lightlevel is below 7 - toggleable
    • Display lowest light level within radius
    • Report if hostile mobs can spawn within the radius
    • Report if snow will melt within the radius
    • Report if trees/crops will grow within the radius
    • Report if friendly mobs can spawn within the radius
    • Supports Permissions (does not require it)
    • /Autolight does not place torches in the spawn protection area
    Usage:

    • /dark [radius] - Will tell you if mobs can spawn within the radius
    • /dark [radius] <snow|trees|animals> - Will tell you if snow will melt, or trees/crops will grow, or animals can spawn
    • /autolight - Toggle the automatic placement of torches whenever it is dark (if you have any in your inventory)
    Issues

    Please do not post bugs or feature requests in this thread! Discussion and simple questions are perfect to put in the forum thread. Issues should go in the issue tracker on github- after you've searched to see if it's already there.

    Issue Tracker on Github

    Before You Post an Issue

    • Please make sure you're running an up to date Craftbukkit. I test using jars from this common repository, and the most recent version I've tested with is always listed in the thread title.
    • If you're going to report a crash or bug, please check your server log for any errors or exceptions and paste them in the report.
    Future Plans:
    • Add configuration file for autolight threshold
    Installation:
    1. Copy Jar file to plugins folder
    2. Add tooDark.autolight and tooDark.dark to permissions config (if using permissions)
    Download Here
    Source Code
    Previous Releases: 2.2.2, 2.2.0

    Changelog:
    Show Spoiler

    Version 2.2.3
    • Permissions no longer required, but will be used if present
    • Torches will not be placed on snow, water, or other torches
    • Removed onPlayerCommand registration
    Version 2.2.2
    • /Autolight no longer remove halfsteps
    • /Autolight will not place torches on fences or steps
    • /Autolight will not place torches within spawn protection
    • Logging of commands to console
    Version 2.2.0
    • Torches are only placed once every .5 seconds to reduce duplicate torch placing in autolight
    • Torches are only placed if block player is on is not air
     
  2. Offline

    ursa_arcadius

    I did not know that, I will look into it.
    I am not really sure how to do that since the spawn is not always at chunk 0,0
    It does not, I can probably look into that though. I am sure worldguard has some sort of API that I could use for it.
    Also a bug of course, I'll see what I can do. It will probably involve not placing torches if the block is a stoneslab, stairs, or fence since those all have those weird quirks that cause weird things to happen.
    --- merged: Feb 21, 2011 8:41 PM ---
    @jwideman Ok, I fixed the problem with free torches and with replacing blocks. Just need to find out how to respect the spawn protection and I will release an update.
     
  3. Offline

    jwideman

    Okay, just a heads up on the torch thing - it was doing it even if there was a whole stack of torches in inventory, as long as there was a single torch. So 65 torches in the inventory = infinite torches. Maybe you fixed it completely, but just letting you know.
     
  4. Offline

    ursa_arcadius

    It should be fixed completely. I was accidentally removing a stack of air instead of a stack of torches and that was causing that whole problem. Also fixed replacing halfsteps and prevented placing in the spawn protection.

    It still does not do anything with regions, I will work on that later when I have some more free time.
     
  5. Offline

    jwideman

    Groovy. Sadly, I haven't updated to CB 400+ yet, since that will break a bunch of other plugins.
     
  6. Offline

    ursa_arcadius

    Still give it a try, I did not test it in older ones, I just know that it for sure will work at 400+
    (I think it should still work for you)
     
  7. Offline

    FabianN

    Getting this in the log:
    Code:
    2011-02-23 01:35:03 [WARNING] Using the stupidly long constructor com.bukkit.ursaarcadius.tooDark.tooDark(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of tooDark to remove it! (Nothing is broken, we just like to keep code clean.)
     
  8. Offline

    ursa_arcadius

    Are you using the most recent version? I thought I fixed that
     
  9. Offline

    jwideman

    If you could update it for the recommended 1.3 build, 432, that would be great.
     
  10. Offline

    ursa_arcadius

    Does it not work anymore? Error messages?
     
  11. Offline

    jwideman

    It wasn't loading. However, the error seems to have been a plugin conflict. I'll see if I can narrow it down for you.
     
  12. Offline

    ursa_arcadius

    Thanks, I will take a look this weekend as well
     
  13. Offline

    jwideman

    Okay, new amusing/frustrating bug discovered: torches removed just repop themselves, even if /autolight is toggled off.
    Nevermind, this isn't related to this plugin.
     
  14. Offline

    jwideman

    Would it be possible to make it so torches aren't placed in water? Really spammy.
     
  15. Offline

    ursa_arcadius

    Are you sure that it is turned off? Can you explain exactly how it happens? Once you turn off autolight it does not even look at you in the playermove so I don't see how that could happen.

    Ah, never thought of that. Yea I can turn that off easily.
     
  16. Offline

    jwideman

    It was the Zone plugin that somehow thought its job was to protect the whole world. :D
     
  17. Offline

    ursa_arcadius

    Ah, ok. Yea my plugin still does not respect zoneing so it will place torches anywhere regardless of if it is protected. I will work on that this weekend I hope
     
  18. Offline

    jwideman

    That's cool. I don't know how these things work - can you work with any zone protection or do you have to hook each one?
     
  19. Offline

    ursa_arcadius

    Fixed!

    I will probably have to do it for each one, most likely just WorldGuard/WorldEdit once 4.0 is fully released
     
  20. Offline

    jwideman

    Hrm... using with GroupManager .99c, I get:
    2011-02-26 18:37:19 [INFO] [tooDark] Permissions detected, using permissions.
    2011-02-26 18:37:19 [SEVERE] com/nijikokun/bukkit/Permissions/Permissions (Is i
    t up to date?)
    java.lang.NoClassDefFoundError: com/nijikokun/bukkit/Permissions/Permissions
    at net.grosinger.ursaarcadius.tooDark.tooDark.setupPermissions(tooDark.
    java:70)
    at net.grosinger.ursaarcadius.tooDark.tooDark.onEnable(tooDark.java:56)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoade
    r.java:426)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManag
    er.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:79)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:60)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.ClassNotFoundException: com.nijikokun.bukkit.Permissions.P
    ermissions
    at java.net.URLClassLoader$1.run(URLClassLoader.java:299)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:288)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:287)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader
    .java:30)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:422)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:355)
    ... 12 more
     
  21. Offline

    ursa_arcadius

    Hmm, do you have everything up to date? Most recent version of craftbukkit and the most recent version of tooDark? I just started it up and had no problems.
     
  22. Offline

    jwideman

    I have the recommended build, which is 440.
     
  23. Offline

    ursa_arcadius

    Well here is what is causing the problem

    Code:
    public void setupPermissions() {
            Plugin test = this.getServer().getPluginManager().getPlugin("Permissions");
    
            if(tooDark.Permissions == null) {
                if(test != null) {
                    tooDark.Permissions = ((Permissions)test).getHandler();
                } else {
                log.info(Messaging.bracketize(name) + " Permission system not enabled. Disabling plugin.");
                this.getServer().getPluginManager().disablePlugin(this);
                }
            }
        }
    The problem line is "tooDark.Permissions = ((Permissions)test).getHandler();"

    I think it is a problem with the permissions plugin (FakePermissions). I just tested on 440 and was unable to reproduce the problem. Not really sure what to do to fix it. Do you have permissions and fakepermissions installed?
     
  24. Offline

    jwideman

    I'm using GroupManager, and the fakepermissions wrapper.
    It's likely I have another plugin conflict, so I'm going to remove them all and start adding them in until something breaks.
     
  25. Offline

    ursa_arcadius

    Ok, please let me know what you find out. [​IMG]
     
  26. Offline

    jwideman

    I have way to many plugins. Been adding them one by one, and so far none of the usual suspects are causing conflicts. Anyway, keep up the good work.
     
  27. Offline

    ursa_arcadius

    Thanks, glad to hear it is working so far
     

Share This Page