Toggling?

Discussion in 'Plugin Development' started by PlannedBoredom, Oct 9, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    PlannedBoredom

    This is a client mod help request, but I didn't know where to post that so, I want to make my mod, LightBlocks, able to be toggled on and off by pressing B. I don't know how to do this and can't seem to find it on the internet. If someone could please tell me or send me a link to a tutorial on how that would be greatly appreciated. Thanks!
    http://dev.bukkit.org/client-mods/lightblocks/
     
  2. Offline

    Celeixen

    That would take spout to catch keypresses. Either you toggle it with commands or you make a spout plugin.
     
  3. Offline

    PlannedBoredom

    This is a client mod. not a bukkit plugin. I dont need spout I just need to keypress the B button in the client mod. just like zombe mods has theres set to F for fly or whatever
     
  4. Offline

    Celeixen

    Ohh sorry so use to people asking about this for plugins :/ durp i should have read more. Now its if(keyboard.keydown(keyboard.key_B)) well that what i used for my client :) just check that, or then your gonna need keyboard listeners.
     
  5. Offline

    PlannedBoredom

    So in my case, I edited the Blocks.java and changed light values for most of the blocks. With that being said, how can I make it where if I press the B button it turns on and if it is pressed again it turns off? I will be sure to tell that you helped in the BukkitDev...
     
  6. Offline

    Celeixen

    I think guiingame.java updates the fastest, so place a static Boolean in there then during the start of the main code have the boolean change itself e.g.

    Code:
    public static boolean boredom = false;
    
    public void main{
    boredom = !boredom;
    then just refer to the value, hopefully you understand.
     
  7. Offline

    PlannedBoredom

    yeah i do, thanks
     
Thread Status:
Not open for further replies.

Share This Page