Create Light on player pos?

Discussion in 'Plugin Development' started by mrrabbit, Apr 20, 2011.

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

    mrrabbit

    I wonder if someone could make a quick overview code of how to make a plugin that makes lite when write /light. I can only code c++. And I have made an pseudocode:

    Something like this:

    string get player input = choose;
    bool choose_true_false;

    if (choose = "/light") {
    choose_true_false = true;

    while (choose_true_false = true) {
    double pos = getplayerpos();

    //create torch on the players pos
    CreateBlock(item_id, pos);

    //check if player writes /light and if so the while loop breaks
    getplayerwrites();

    if (getplayerwrites = /light) {
    choose_true_false = false;
    }
    }

    Something like that, if you someone understand what I mean. Can someone write a quick java code of this. And explain how the code works. Thanks /mrrabbit
     
Thread Status:
Not open for further replies.

Share This Page