Tree Regen

Discussion in 'Plugin Development' started by MrLizardDogMan, Mar 24, 2014.

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

    MrLizardDogMan

    Hello, I want to add a feature to my plugin that will allow trees to regenerate after a certain amount of time (15 minutes.) How would i do this/is there already a plugin that can do this?

    I've seen RegenBlock, but its way out of date.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  2. Offline

    jthort

    MrLizardDogMan You could listen to the player and see if they are cutting a tree down, and if they are, get the tree they are interacting with. Then create some type of timer and start it for 15 minutes. At the end of the timer, just use the location you got when the player was interacting with the tree and use the following
    Code:
    world.generateTree(bloc, TreeType.TREE);
     
  3. Offline

    MrLizardDogMan

    jthort Could you give me an example of this code?
     
  4. Offline

    MrLizardDogMan

Thread Status:
Not open for further replies.

Share This Page