[MECH] LightSensor v0.9 - Light dependant levers [1185]

Discussion in 'Inactive/Unsupported Plugins' started by Tiramon, Feb 25, 2011.

  1. Offline


    I know this sounds exactly like iLDR, but because iLDR never worked for me i wrote my own.

    The basic idea is to turn redstone circuits on and off dependant on the surrounding light.
    For example to close doors at night or something like that. Or what i want to do in combination with ControllerBlock fade out my torches at day and fade them in aga in at night.

    How to:
    Just hit a lever with a redstone torch to turn it into a LightSensor. From now on it will automatically turn on if the lightlevel of the lever is equal or less to the configured value (default: 7) and turn off again as soon as the light level increases above the configured value.
    Each LightSensor can be configured with a separate value.
    If you right click a LightSensor it shows you the configured value and the current lightlevel. If you right click the lever again within 2 seconds the configured value is increased by one (if 16 would be reached it steps down to 1)

    Currently i check all 2 seconds the lightlevel of all registered LightSensors

    LightSensor v0.9 Download

    - automatically downloads sqlite.jar if needed
    - each lever can get his own configuration
    - lever turns on when light level is equal or less the configured value
    - lever turns off when light level is above the configured value
    - configurable check interval (default 2seconds)
    - configurable default light sensitivity (default 7)


    Known Issues:
    - Sensor attached to sand or gravel are not deleted when the block falls down and so unattaches the lever

    Version 0.9
    -Only interact with a LightSensor when the chunk is loaded
    -deleting the lightsensor from db when the block where the sensor should be is not a lever
    -Hopefully fixed the classcast of post #77

    older Changelog (open)

    Version 0.8
    - making it working again with b1000

    Version 0.7
    - catching ConcurrentModificationException in LightSensorThread
    - closing database connection in onDisable

    Version 0.6
    - removed spaming debug output
    - fallback method for byId return value is null
    - NullPointer Check in LightSensorPlayerListener:19

    Version 0.5
    - sensor check is disabled while no player is online, this fixes the reported bug on disconnect of last player
    - adapted to event changes in b561

    Version 0.4
    - configurable check interval (default 2sec)
    - configurable default value (default 7)
    - fix for the not working redstone

    Version 0.3
    -fixed Bug with new implemented Physics
    -fixed lever switching and this way attaching the lever to another wall
    -sensors attached to a broken block are now deleted correctly

    Version 0.2
    -removed unsed command and so removed PLAYER_COMMAND
    -bugfix: if a block where a lightsensor is put on was destroyed the sensor wasn't deleted (because i can't get the user involved in destroying the sensor, i make an log output 'LighSensor deleted by Physics' )

    Version 0.1
    First Release

    Forgot to add bukkit build in the title, if someone who can change the title could please add the [440]

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


    Long time no see Tiramon. You will notice that this thread has now been placed into the Inactive Plugin subforum.
    If you wish to revive this plugin, please ensure that you update and test compatibility with the latest recommended Bukkit build before reporting your original post, asking for it to be moved back to the release forum.

    Thanks for your time.

Share This Page