CityLanterns
Description
This plugin let selected redstone lanterns of different groups switch on/off at differeren (ingame) times, e.g. at sunset lanterns of group A will toggle on while lanterns of group B will toggle on at midnight.
Lantern Selection / Tutorial
To modify which lanterns belong to which group, do /citylanternsselect or /citylanternsselect <group> (If you do not specify a group, "main" will be used), a tool will be added to your inventory. Then you can right-click a redstone lantern with that tool to check which group that lantern belongs to, or left-click to add/remove the lantern to/from the group. After one lantern is added to a new group, you can change the settings of that group in the config. Then wait for the night and see them switching on :D
Config
For a default config with key definitions, see here.
Commands & Permissions
- /citylanternsselect|cls [<group> [new|we]]
-
Will either give (or replace if
newis not given) a tool for adding/removing lanterns to/from the group<group>(Will be set to 'main' if not supplied) or, if theweargument is given, sets the group of all lanterns to<group>in the currently selected WorldEdit region.Permission name is
citylanterns.select(default for ops) - /citylanternsgroups|clg [<group>]
-
Lists all groups or, if
<group>is given, shows detailed information about that group.Permission name is
citylanterns.groups(default for ops) - /citylanternssettings|clsetting [<group>] day|night|thunder <number>|true|false
-
Sets config properties for a the group
<group>, ormainif not supplied.Permission name is
citylanters.settings(default for ops) - /citylanternsreload|clr [force]
-
Reloads all lanterns and group settings. If
forceis supplied, this will discard all data and load them from the storage.Permission name is
citylanterns.reload(default for ops)
(For commands in version <= 1.8.1, see here)
Changelog
v2.1.1:
- Updated to CraftBukkit version 1.7.9-R0.2
v2.1:
- Added Reload command
- Changed Select command
- Added more storage options for lanterns and groups
v2.0.3:
- Added /citylanternssettings command
- Fixed groups
- Faster block updates
v2.0.2:
- Updated to CB 1.7.2
v2.0.1:
- Updated to CB 1.6.4
v2.0:
- Complete command rework
- Selection now by tool
- Ability to form groups of lanterns with different settings (on/off/thunder) (inspiration from fov360)
- WorldEdit hook to set group of all lanterns in the WorldEdit selection
v1.8.1:
- Custom worlds loaded after the plugin will cause a lantern reload to fix a bug
- Fixed bug when lanterns are destroyed
v1.8:
- Updated to 1.6.2
v1.7:
- Updated to Bukkit 1.5.2
- Lanterns which are closer to players will be toggled before lanterns which are farer to players. Idea by dab1983. Thx
v1.6:
- Set the compilance version from 1.7 to 1.6 so that the Bukkit standards are kept.
- Updated to CraftBukkit version 1.5.1-R0.1.
v1.5:
- Added a delay between toggling the lantern states to prevent lags. Idea from John290. Thx.
v1.4:
- Fixed bug lanterns will start flickering rapidly when weather changes. Reported by TheMisterB. Thx.
v1.3:
- Added plugin metrics submit provided by http://mcstats.org/
- Fixed bug config files were not created on startup. Reported by mcferson. Thx.
v1.2:
- Added the function to toggle the redstone lanterns if it's raining/thundering.
- Fixed bug being unable to remove lanterns wich are on.
v1.1:
- Initial version with compatibility to CB 1.4.7-R1.0.
Stats Collection
This plugins automatically sends information for statistic purposes only to MCStats, specifically (quoted from https://forums.bukkit.org/threads/mcstats-plugin-metrics-r7-easy-advanced-plugin-statistics.77352/)
- Metrics revision of the implementing class
- Server's GUID A randomly generated ID to identify the server
- Players currently online (not max player count)
- Server version string (the same version string you see in /version)
- Plugin version of the metrics-supported plugin
To disable data collection, you can set opt-out to true in plugins/PluginMetrics/config.yml.
The collected data can be seen by everyone at the MCStats project page.
Source
Source can be found at GitHub.

-
View User Profile
-
Send Message
Posted Aug 12, 2013@WsupPanda
Can I have the server log since the error occured so I can find the complete error message to fix the bug?
-
View User Profile
-
Send Message
Posted Aug 12, 2013@ase34
The error is on and off, which makes the plugin sometimes unreliable. Sometimes, after the server automatically restarts, the plugin stops working. The lights selected stay on in the day and in the night, without turning off. If we try re adding the lamp, it doesn't turn on at all. Then when I check the console, it is being spammed by the error message prescribed below.
So when this happens, the function of the plugin stops working, though the command /sl still works, just the lights don't actually react to the time, or turn on at all. However, once I restart the server again after this, it works again. But, when it does work again all the lamps are no longer added so I need to readd all of the lamps I want to be turned on at night.
-
View User Profile
-
Send Message
Posted Aug 9, 2013@WsupPanda
Can you describe the situation when that error occured? Is there a bigger error message in the log?
-
View User Profile
-
Send Message
Posted Aug 9, 20132013-08-09 04:27:12 [WARNING] [CityLanterns] Task #31 for CityLanterns v1.8 generated an exception java.lang.NullPointerException
-
View User Profile
-
Send Message
Posted Jun 5, 2013@HammyHavoc
If you want to delete all currently saved lamps, delete plugins/CityLanterns/storage.txt while the server is not running.
-
View User Profile
-
Send Message
Posted May 30, 2013How do I remove all current lamps so I can start adding them elsewhere on another world without those ones lighting first?
-
View User Profile
-
Send Message
Posted May 25, 2013[WARNING] [CityLanterns] Task #5 for CityLanterns v1.7 generated an exception
-
View User Profile
-
Send Message
Posted May 9, 2013@TheMisterB
Thx for your suggestion, I'll try to implement that
-
View User Profile
-
Send Message
Posted May 8, 2013So when the lamps update, I've noticed that sometimes the block changes, but the light doesn't actually project from the block until the block itself is updated. As far as my testing goes I can tell you it's a serverside bug. Is there a way to update the lamp after the block is changed from unpowered to powered through the plugin?
-
View User Profile
-
Send Message
Posted May 8, 2013@mrtitusr
In the config, you can set the delay to 0, or you just change the time where the lamps are toggling off
-
View User Profile
-
Send Message
Posted May 7, 2013@ase34
Is there anyway to disable this delay? I've got, well, a lot of lights... and the delay is enough to where i've simply removed them all and replaced with torches as i was getting mob spawns in area's where the redstone lamps used to illuminate.
-
View User Profile
-
Send Message
Posted Apr 30, 2013I tried out v1.6 of this plugin. It caused another plugin, TF2, to fail. Removed CityLanterns.jar from plugin directory, changed nothing else, and TF2 works again.
-
View User Profile
-
Send Message
Posted Apr 9, 2013@martijn134
Any errors in console? And please check that you use the latest version.
-
View User Profile
-
Send Message
Posted Apr 7, 2013Hello,
I still cant get the config files they wont start up
-
View User Profile
-
Send Message
Posted Mar 10, 2013Thank you all so much to make it possible reaching my goal having 1,000 downloads and thank you to all who gave me feedback and improvements that have made this plugin better.
THX
-
View User Profile
-
Send Message
Posted Mar 8, 2013@CaptainXD
Get this too
-
View User Profile
-
Send Message
Posted Mar 8, 2013@John290
Version 1.5 is out containing your idea to prevent lags on toggle. Thx.
-
View User Profile
-
Send Message
Posted Mar 7, 2013@CaptainXD
I just ckecked it on a Bukkit server without other plugins and the config should normally be created. Do you use the latest version?
-
View User Profile
-
Send Message
Posted Mar 7, 2013I really want this plugin, but whenever I try to install it, no config pops up, and I can't use /selectlanterns in-game. Are there some plugins CityLanterns is incompatible with?
-
View User Profile
-
Send Message
Posted Mar 6, 2013One problem im having. In the morning and at night all the lights turn off/on at the same time and cause a massive lag spike. (maybe a 3 or 4 seconds of lag, then back to normal) Its not a big deal just wondering if this is fixable? Had a thought that maybe the lights could be turned off/on 1 by 1, with a small delay inbetween them? Maybe that could fix the spike? Just an idea. None the less thanks for the excellent plugin!