LampControl

LampControl Logo

LampControl

Turn on lamps by clicking them and with WorldEdit!

LampControl allows players to use a specified item to turn on Redstone Lamps and keep them on. This plugin is lightweight and does not use a database to keep the lamps on. LampControl changes the state of the block to ON in your world and keeps it that way until the block is updated. This means you could even use this plugin to turn on lamps, remove the plugin, and the lamps would still be on.

Features

  • Turn on/off Lamps with item (default: flint/steel)
  • Turn on Lamps with WorldEdit
  • OPs can turn on/off lamps with their hand
  • BONUS: Turn on/off Powered Rails just like lamps
  • Plugin automatically checks for updates

Config

  • Choose the LampControl Item
  • Use permissions or allow everyone to control lamps
  • Enable/Disable pressure plates controlling lamps
  • Enable/Disable OPs turn on lamps with their hand
  • Enable/Disable lamp toggling
  • Enable/Disable powered rail toggling.
  • Enable/Disable automatic update notifications

Commands

All of the commands below will set the lamps in a WorldEdit selection to ON.

  • //lamp
  • /lamp
  • //lc
  • /lc
  • /lampcontrol
  • /<command> [percentage] - Set a percentage of random lamps to be turned ON
  • /<command> off [percentage] - Set a percentage of random lamps to be turned OFF
  • /<command> update - Update to the latest version of LampControl

Permissions

  • lampcontrol.use (Only applies if usePermissions: true)
  • lampcontrol.worldedit (Allows using lamp to turn on lamps)
  • lampcontrol.hand (Allows turning on lamps with an empty hand)
  • lampcontrol.update (Notifies user of updates and allows updating command)

Updater

In the unlikely event that you missed it in the previous four sections, this plugin has an update checking system! It will automatically notify you of available updates for the plugin and let you download them using the command /lc update. You can disable this function in the config.

TO-DO

  • Allow toggling of lamps so you can turn OFF lamps that are on. DONE!!!
  • Add /lamp off to turn off lamps in a selection DONE!!!
  • Let me know your ideas!

This plugin is updated and improved upon from LumosMaxima

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of AT_HE AT_HE Jul 10, 2014 at 16:12 UTC - 0 likes

    @jacklink01: Go

    i tested like op .. maybe when i am op all permissions gets true by default :/ .. anyway it shouldn't be because when someone needs to test something he gets op, and if all permissions are set to true can be difficult to debug (happened to me)

    Last edited Jul 10, 2014 by AT_HE

    <<size 0px>>BFAK:90618214,3eab542c1eff754c4af5ce4a10c20b3a0c125f87a2c5b57bcbc47377527744a3<</size>>

  • Avatar of jacklink01 jacklink01 Jul 10, 2014 at 15:23 UTC - 0 likes

    @AT_HE: Go

    Well if you have usePermissions set to false then of course the permissions won't work. lol. If you want to use permissions, then you need usePermissions to be set to true.

    EDIT: I think I understand what the issue is though after some more thought. I will look into this when I have time.

    Last edited Jul 10, 2014 by jacklink01

    Server IP: mine.voidteam.net || Server website: voidteam.net || Admin/Main Operator

  • Avatar of AT_HE AT_HE Jul 10, 2014 at 15:20 UTC - 0 likes

    @jacklink01: Go

    usePermissions: false

    anyway, i found for some reason e.getPlayer().hasPermission("lampcontrol.hand") got true even i have not permissions configured

    my permissions.yml file is empty as default, i haven't even a permission plugin installed! .. tested with cb179r1, try it

    Last edited Jul 10, 2014 by AT_HE
  • Avatar of jacklink01 jacklink01 Jul 10, 2014 at 15:13 UTC - 0 likes

    @AT_HE: Go

    Do you have userPermissions set to false?

    I'll fix this in the next update

  • Avatar of AT_HE AT_HE Jul 10, 2014 at 15:03 UTC - 0 likes

    i think i found a bug in v2.5 .. with the plugin installed, i can use ANY item in hand to turn redlamps on ... maybe can fix if you replace line this at line ~53 in LampListener.java

    if (((e.getPlayer().isOp()) && (Main.opUsesHand == "true")) || (e.getPlayer().hasPermission("lampcontrol.hand")))
    

    by this

    if (((e.getPlayer().isOp()) && (Main.opUsesHand == "true")) || ((Main.usePermissions == "true" && e.getPlayer().hasPermission("lampcontrol.hand"))))
    
  • Avatar of AT_HE AT_HE Jul 07, 2014 at 00:30 UTC - 0 likes

    EDIT:

    i think i found the problem .. there is nothing wrong with the code but the way of triggers .. you trigger it when you "use" the item in your hand on the redlamp, i trigger when i place fire with flint and steel over the redlamp .. it worked ok with cb 172, but now for some reason redlamp flashes and turns off again .. i am searching why


    hi .. thanks for your plugin

    i am developing a plugin that requires redstone lamps still lighted too, but i had some problems and i'd like if you tell me some advices .. it worked with cb v1.7.2 but with 1.7.9 doesn't anymore ... what i did is:

    • a project in eclipse
    • use craftbukkit 179 r01 jar as library
    • this code when i "switch on" a lamp
    import org.bukkit.craftbukkit.v1_7_R3.CraftWorld;
    if (ref.intValue() == 124){
    	boolean Static = ((CraftWorld) loc.getBlock().getWorld()).getHandle().isStatic;
    	((CraftWorld) loc.getBlock().getWorld()).getHandle().isStatic = true;
    	loc.getBlock().setTypeId(124);
    	((CraftWorld) loc.getBlock().getWorld()).getHandle().isStatic = Static;
    	return true;
    }
    
    • this code on listener to cancel switch off events
    private List<Integer> redBlocks = Arrays.asList(new Integer[]{27, 28, 36, 55, 69, 70, 72, 75, 76, 77, 93, 94, 94, 131, 132, 143, 147, 148, 149, 150, 152});;
    @EventHandler
    public void onBlockPhysics(BlockPhysicsEvent event){
    	if (event.getBlock().getTypeId() == 124 && !redBlocks.contains(event.getChangedTypeId())) event.setCancelled(true);
    }
    

    but lamps get ligthed and turns off at once .. please help me on what i am missing or doing wrong or where to get more info.. thanks

    Last edited Jul 10, 2014 by AT_HE
  • Avatar of jacklink01 jacklink01 May 12, 2014 at 21:30 UTC - 0 likes

    @FantasyCraftThemeParkServer: Go

    You need to use version 2.4 for CraftBukkit 1.7.5 :)

    Last edited May 12, 2014 by jacklink01
  • Avatar of FantasyCraftThemeParkServer FantasyCraftThemeParkServer May 12, 2014 at 21:28 UTC - 0 likes

    hi, I'm running a craftbukkit dev 1.7.5 server and downloaded lamp control v2.5 and when i try to use it it says 'this version of craftbukkit is not compatible! try /lc update' so then i type .lc update and it says ' No updates are available!' so what do i do? do i download a different one?

  • Avatar of jacklink01 jacklink01 May 02, 2014 at 04:45 UTC - 0 likes

    @DerekZil: Go

    Which Spigot build are you using, because it works fine for me on Spigot #1451. Are you using LampControl 2.5?

  • Avatar of DerekZil DerekZil May 02, 2014 at 02:06 UTC - 0 likes

    @jacklink01: Go

    This doesn't work for Spigot builds that are capable of 1.7.9. :/

    Insanity Realms Website

How have you been living without this plugin?

  1. Choice:

  1. Results
  2. 0 comments

Facts

Date created
Jul 30, 2013
Categories
Last update
Apr 28, 2014
Development stage
Release
Language
  • enUS
License
GNU General Public License version 3 (GPLv3)
Curse link
LampControl
Downloads
10,585
Recent files

Authors