StreetLights
Please update from 1.1.x! The /sl remove command isn't save! It allows you to remove other peopel's streetlights. It's fixed in 1.1.2
General
Always wanted to get working streetlights in your server? Now you can! Pick the lights you want to light up at night and presto! They will light up when it rains or when it's night.
By default the blocks will be Redstonelamp (offstate) at day and Redstonelamp (onstate) at night. The time they will be on is from 13000 till 0. These can all be changed in the config.yml (Version 1.0.2) To add multiple set of items to switch from just add a new line with two materials. (Please note that you shoudln't use duplicate materials)
Installation
Pretty straight forward here: Place the jar file in your plugin directory and you're good to go.
OP's have all permissions by default but if you want players to control the lights as well please give them permissions:
- streetlights.* (Everything EXCEPT: streetlights.admin)
- streetlights.admin (Allows the removal of other's streetlights)
- streetlights.create (Allows to create new streetlights)
- streetlights.remove (Allows to remove new streetlights)
- streetlights.save (Allows user to save the list with lights)
- streetlights.list (Allows user to view coordinate list of lights)
- streetlights.clear (Allows user to clear all the lights)
- streetlights.reload (Allows user to reload the config file)
- streetlights.info (Displays info about the clicked streetlight)
How to use
Create a Redstone lamp and use "/sl create" command. Then rightclick the blocks you want to light up at night (Redstone Lamps by default). When you're finished adding the lamps type "/sl create" again. If you wish to manualy save you can use "/sl save". (The list will automaticly save after every placed or removed streetlight). You "/sl remove" to remove streetlights from the list :)
Bugs
- Natural rain sometime doesn't trigger the lights.
- You cannot use REDSTONE_TORCH_OFF.
Can we see it in action?
I've created this timelaps on my server which shows the streetlights going on and off.
http:www.youtube.com/watch?v=EL7MQ2d-H40&feature=youtu.be
Source Code?
The sourcecode is available from GitHub: https://github.com/Koozza/StreetLight
User Videos
Some of the users made video's of the plugin. Here's some of them:
WoopaGaming (English)
MineraftBukkit (German)
TheBukkitTutorialsHD (German)
MinecraftPommes (German)
victormac737 (Spanish)
Special Thanks
Special thanks go to Craftiii4 for helping me with the REDSTONE_LAMP_ON state :)
@thijsd
What? This plugin is broken?? But it's still working fine for me on 1.4.2...
@snitride
Can you please explain what to change? Cause i really need this plugin to work.
@devman45
Well my exams aren't going that well :P My last one is friday ;)
update??
Good luck with your Exams :)
@thijsd
Excellent, thanks! Good luck with your exams ;)
@snitride
Could you perhaps submit your config so others can use it?
I'm aware that the plugin is broken ATM, But I'm in an exam period right now so I really don't have time to fix it. I'm finished at the end of next week, so I might fix it by then :)
Please update this. It is not working correctly with the latest update of MC. The timing of the lights is bugged.
How is the Configuration in Minecraft 1.4.2. Cause the Day and Night is very crazy xD
@snitride
I was having the same problems, that's why I postponed the update :)
Plugin works with latest MC1.4.2 and CB#2400+ but you have to change the time in the config, because day and night cycles have changed since last mc update ;) Thanks for great plugin, greetings, snitride
@doggyroc
Noticed your pull requests, Will merge them and upload it in a minute :)
Edit: Having problems with the code, Will fix it ASAP.
@UnitedFactions
Put a pull request in to fix that, turns out the developer was putting null values for each world because the config was loaded after the implementation.
@UnitedFactions
How did you get that error? I couldn't reproduce it. This plugin is simply amazing. Thank you so much for making this, thijsd :D
@thijsd
Hey when are you going to fix this:
2012-10-15 16:20:25 [SEVERE] Could not pass event WeatherChangeEvent to StreetLights
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:341)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:35)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
at org.bukkit.craftbukkit.CraftWorld.setStorm(CraftWorld.java:667)
at com.sk89q.worldguard.bukkit.WorldGuardWorldListener.initWorld(WorldGuardWorldListener.java:75)
at com.sk89q.worldguard.bukkit.WorldGuardPlugin.onEnable(WorldGuardPlugin.java:172)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:374)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:266)
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:248)
at net.minecraft.server.MinecraftServer.i(MinecraftServer.java:297)
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:276)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:226)
at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:140)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:377)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
Caused by: java.lang.NullPointerException
at com.thijsdev.etc.Functions.togglelights(Functions.java:66)
at com.thijsdev.StreetLights.StreetLightsWeatherListner.onWeatherChange(StreetLightsWeatherListner.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339)
... 18 more
@Nicknufayl
You should be able to do this already. Look up the material names on: http://jd.bukkit.org/apidocs/org/bukkit/Material.html Then you can just change the config :)
Dude, can you make the update that Pumpkin can turn to Jack O Lantern!? Please :)
Is is usable on 1.3.2 R1
@notbob1
Good to see it works fine and dandy, I'm about to do the same :D