Inactive [MECH] Lampstone/Timeblock v1.0 - Automatic night-time ANYTHING [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Izze, Mar 4, 2011.

  1. Offline

    Izze

    Lampstone - Automatic night-time lamps ANYTHING
    Version: v1.0

    This plugin lets you place any block which turn into another block type in the morning, and then turns back into the first block type in the evening. This lets you build nice looking lamp posts which turn themselves off in the morning and stuff like that.

    Feutures:
    • Adds the /lampstone command, which enables and disables lampstone mode
    • Use any block type for both day and night.
    Screenshots:
    [​IMG]
    [​IMG]

    Screenshots taken with a modified version of Painterly pack, to match glowstone and glass texture.

    Download Lampstone v1.0 here!
    (Mirror)

    Instructions:
    1. Download Lampstone.zip above
    2. Open Lampstone.zip
    3. Place everything inside Lampstone.zip in your plugins folder. This should include: Lampstone.jar and a folder called Lampstone, with the files called lampstoneLocations.yml and lampstoneProperties.yml inside.
    4. If you want to change the default properties, open up lampstoneProperties.yml.
    5. In lampstoneProperties.yml, change numbers behind blockDay and blockNight to your liking. (It should be block IDs, default is 20 (glass) in the day and 89 (lightstone) in the night.)
    6. Save lampstoneProperties.yml (if you changed it) and run the server
    7. To enter lampstone mode, enter "/lampstone" in the chat
    8. When in lampstone mode, place a block of the type you specified as blockNight in lampstoneProperties.yml anywhere. If you didn't change any properties, this is a glowstone block. A message in the chat should tell you that a lampstone block has been created.
    9. If you want to use another block combiantion than the defaults (the ones in the configuration file), you use the command like this:
      /lampstone [blockDay] [blockNight]
    10. To exit lampstone mode, simply enter "/lampstone" in the chat again
    Permissions:
    • Lampstone.create (self-explanatory)
    • Lampstone.break (self-explanatory)
    Changelog:
    Version 1.0
    • You can now select any block type for both day and night.
    Version 0.8
    • Fixed a lot of bugs reported by xGhOsTkiLLeRx.
    Version 0.6
    • Checks if the chunk is loaded before it tries to change the block type of a lampstone.
    • Tells you how many lampstones that were loaded at server startup.
    Version 0.5
    • Console outputs a message if it fails to load a block from the lampstoneLocations.yml file. This is for bug catching purposes.
    Version 0.4
    • Fixed bug where properties didn't work. Thanks to SuperThaTom for telling me.
    • Checks so that your properties are valid on initialization.
    Version 0.3
    • Fixed bugs
    • Files creates themselves
    • Warning: BREAKS YOUR V0.2 LAMPSTONES!!
    Version 0.2
    • Added lampstoneProperties.yml
    • You can now choose which blocks should be lampstones
    Version 0.1
    • Initial release
    Known bugs:
    • If you forget to create or remove the contents of lampstoneLocations.yml, the plugin will fail to initialize. Help needed and appreciated! Fixed with help from Nohup! Many thanks!
    • Breaks after a while for some people.
     
    Emiya Shirou, nova779 and MuttsNuts like this.
  2. Offline

    Izze

    I'm still here, although not as much as I used to be. Haven't had a lot of time on my hands, since it's summer and stuff here where I live.

    I'm starting to get back to programming from some kind of break. A new version of Lampstone is now uploaded. I think I've managed to fix most of the bugs that xGhOsTkiLLeRx found, and I've tested it to some level now (different worlds, different permissions, different times etc.). Hopefully, this should be working flawlessly now, and I'm now planning some new feautures, like for example the ability to define day/night blocks for every Lampstone block (I should probably rename the plugin by then).

    Also, I'm sorry for being so inactive lately.
     
    Don Redhorse likes this.
  3. Offline

    xGhOsTkiLLeRx

    Yeah!
    Finally 0.8 :)

    Great you found some time to update it!
     
  4. Offline

    Timecpo

    Can I change all my Glowstones in a specific area to lampstones without replacing them?
     
  5. Offline

    Izze

    Sorry, that doesn't work right now. That's actually quite a good suggestion. Mark blocks as Lampstones by activating some command and then right-clicking them. Thanks!

    So, I had some time to update this one.

    You can now set which block type ID the block will have at day and at night. You use it like this:
    /lampstone [blockDay] [blockNight]
    If blockDay and/or blockNight are left out, the defaults (the ones in the config file) are used.

    I hope this works for everybody. I've tested it and it seems to be working just fine.
    Oh, and there's no need to redo your current lampstones. :)

    I propose I rename this to something like Timeblock now. Any other name suggestions?

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

    Drat333

    Hey, long time user of this, love this plugin!

    Now.... I use this plugin called FeaturePack, which allow users that have Spoutcraft to set the time of day for their own clients. Of course, that's not the actual server time that's being set, so if you set your personal time to night time, the lampstones don't change to glowstones (soon to be re-skinned jackolanterns on my server ;) ). Do you think you can hook into the FeaturePack plugin, or the Spout plugin to prevent this?
     
  7. Offline

    Izze

    I'll look into it, but I'm not sure you can change the block type for just one person at a server. If that's the case, I don't think it is currently possible to fix this, but I'll check.

    Thanks for using this plugin. :)
     
  8. Offline

    xGhOsTkiLLeRx

    Yeah!
    Glad you found some time to release 1.0 :)
     
  9. Offline

    Izze

    Thanks! I'm also happy to finally release it.

    Confirmed to work with build 1060.

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

    Drat333

    Ok, here's my issue.

    Download new "Timeblock" version. Continued to put down regular glowstone lamps. Then, I decided that I will make all my lamps jackolanterns. So, I goes into the config, change night block to jackolanterns, done. Now, my OLD glowstone lamps are jackolanterns now, but the ones that I placed POST-update are still glowstone. And it's a lot. How can I change them all? Will worldedit work?

    EDIT: Worldedit doesnt work :(

    EDIT 2: Glowstone and Jacks have the same light level, there is no point in me changing the blocks anyway....
     
  11. Offline

    Izze

    Oh, right. Didn't think about that. Right now, old lampstones doesn't have blockDay and blockNight IDs saved while new ones does, even if they are placed with default IDs. Like this:
    Code:
    Newly placed block:
    - <UUID>
        - <x>
        - <y>
        - <z>
        - <worldName>
        - <blockDay>
        - <blockNight>
    
    Old block:
    - <UUID>
        - <x>
        - <y>
        - <z>
        - <worldName>
    If the values for blockDay and blockNight aren't found when the lampstones are loaded, they use the default values.

    Should I change the function of the default "/lampstone" command so that it doesn't save IDs, so that you can change them by changing the config-file?

    Thanks for using my plugin by the way! :)
     
  12. Offline

    Emiya Shirou

    Oh, nice update since 0.6 :D Ben using 0.6 on my server up till now, just updated to 1.0 ^^ But i get the felling that server lags now for couple seconds when switching from glass to glowstone and from glowstone to glass D: I need to check it out again later when I'm more rested but it wasn't like that before (nor errors in console)
     
  13. Offline

    Izze

    It is because the server has to change a lot of blocks at the same time. This does create a lag spike if there are many lampstones and if the server isn't some kind of super-machine. ;)
    Not a lot I can do about that, sorry.
     
  14. Offline

    Emiya Shirou

    It has only 512 mb xD (the rest are pretty good specs though and really fast inet connection, we are buying our server at one company) the limit for players are 8 and I can't do much about this for now. There is about 109 lampstones by now and that number will grow.

    But my concern is why this doesn't lag in 0.6 (it's the same routine of changing blocks) but manage to lag at 1.0 D: ?
     
  15. Offline

    verent

    Help im having problems when other ppl is using the /help command.
    It keeps repeating this in the console everytime someone types /help

    Error getting help for: lampstone
    java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
    at com.earth2me.essentials.commands.Commandhelp.getHelpLines(Commandhelp.java:153)
    at com.earth2me.essentials.commands.Commandhelp.run(Commandhelp.java:56)
    at com.earth2me.essentials.commands.EssentialsCommand.run(EssentialsCommand.java:82)
    at com.earth2me.essentials.Essentials.onCommandEssentials(Essentials.java:447)
    at com.earth2me.essentials.Essentials.onCommand(Essentials.java:357)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:453)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-28 11:40:48 [INFO]
     
  16. Offline

    justproud2b

    Nothing in that error mentions lampstone that's Essentials, Bukkit nothing this developer can do anything about as far as I know. Also I don't think that is the full error as most of them start with something else rather than a string.
     
  17. Offline

    verent

    the first line of the error mentions lampstone
    After deleting lampstone and restarting the server , i tried typing /help and the error did not appear . i redownloaded lampstone and the error reappeared...
     
  18. Offline

    verent

    No one Bother to help ?
     
  19. Offline

    Izze

    I could've mistyped something in my manifest-file, and that could be the problem. If Essentials handles help in a different way, I'll have to look it up.
    I'll try to fix it tomorrow. :)
     
  20. Offline

    TTSDA

    Hi, I really like this plugin, but there is something I think would make it nicer, the option to make lampstone light up when raining (Everything gets much darker).
     
  21. Offline

    Holyasgard

    Hello,

    Who can i Destroy Lampstone Blocks ?

    When i Destroy a Lamp than Respawn the Block after 2-5 Seconds.

    I Try it in Normal and in Lampstone Mode and have OP Rights.

    Best Regards, Christian :)

    Nobody a Idea for this Problem ?

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

    Holyasgard

    Hello ? Anyone here ? ^^
     
  23. Offline

    xGhOsTkiLLeRx

    I don't know,

    but it could be that you need the permission!
    (Not sure if @Izze uses the SuperPerms or still old Permissions)
     
  24. Offline

    Izze

    Oh hello. There's much going on, haven't had much time for this (school etc.). Sorry. :(

    I'm not very much into permissions, as I've never used them. I'll look into SuperPerms, because I think I use the "old permissions". I'll do this as soon as I get some time over. :)
     
  25. Offline

    Holyasgard

    I Used Permission and i`m Admin and Op.

    I Cant Destroy a Created Lampstone in Normal in Lampstone Mode.

    Edit:
    Is the Lampstone Skin on the Picture only als Latern or all Glass and Glowstone ?

    Can you please Write a Tutorial zu Add the Texture ?

    I do not Understand da Original Site from the Texture Pack
     
  26. Can you make that this work with PEX
     
  27. Offline

    Silvo

    How about... disabling/enabling blocks on day/night
     
  28. Offline

    Sorken

    @Izze
    Tested on Lampstone 1.0 with Permissions 3.1.6

    Lampstones drop nothing now even if you are allowed to break them.

    From console: Note that AdminCmd complains about a permission issue and colors not working on the Lampstone msg.
    2011-09-13 08:33:44 [INFO] [AdminCmd] Problem with permissions of Lampstone
    2011-09-13 08:36:44 [INFO] [Lampstone] Lampstone block removed by §2§fmetalkirana§f

    You probably dont need to have permission nodes at all, but instead observe building rights in general. Ie have it be aware of a block placement being denied/rejected/cancelled or whatever its called. Towny and Permissions both may do this when a user isnt allowed to place or break blocks.

    If lampstone place is cancelled - dont save lamp coords to file.
    If lampstone break is cancelled - dont drop drops from breaking the block
     
  29. Offline

    Don Redhorse

    concerning the lag issue... perhaps moving the block switching to a different thread could help?

    if that doesn't break anything else..
     
  30. Offline

    Jiggy

    please update for bukkit #1185
     

Share This Page