[INACTIVE][MECH/SEC]AutoPlant v1.60 - Keep forests alive! CB[740] - CB[440]

Discussion in 'Inactive/Unsupported Plugins' started by Hawox, Mar 3, 2011.

  1. Offline

    Hawox

    AutoPlant - Keep forests alive!
    Versions and Downloads
    (May need to scroll)

    Source:
    https://github.com/Hawox/AutoPlant

    Are your forests disappearing over night? Are your new players having to travel for days on end to find a tree to even start playing? Sick of having to replant all those burned down forests everyday? Then this is for you!

    This is a very simple plugin that automatically plants a sapling when a log is broken(or burned) on top of dirt. It keeps forests planted with no effort on anyone's end at all! I've been using it on a server I use to work on for quite sometime and there are still trees everywhere around spawn. Yes is creates extra saplings into the system but since when have they been all that valuable?

    To put it simply. This plugin simulates everyone on your server being kind, caring, and considerate to the other players while still allowing them to be lazy!

    There is a config file that should be made when the plugin is first ran (it's also included in the .zip) that you can modify. It looks like this:

    Code:
    #Delay from log break to the sapling being planted (in milliseconds)
    Plant_Delay: 1000
    #How long the sapling is protected after this plugin plants it (in milliseconds)
    Protect_Time: 1000
    
    #When true the plugin will autoplant a burning log
    Replant_Burned_Tree: true
    
    #If these are true the the text in the variables below will be shown
    Tell_User_Planting: false
    Tell_User_Protected: true
    
    #The message that is sent to the player when a sapling is added to the play queue
    Being_Planted_Text: A new sapling will arrive in one moment
    #The message that is sent to the player when they try to break the recently planted/protected sapling
    Protected_Text: This sapling is protected from jerks like you!
    
    

    Features:
    • Auto plants a saplings when people harvest trees or when the tree is burned down.
    • Protects these saplings for a time after they are planted.
    • Also protects the dirt the sapling is on!
    • Can send a small message to the player so they know a sapling is coming or that a sapling is protected.
    • All of the above can be changed/modified in the config.yml file.
    Changelog:

    Version 1.60
    • Correct sapling type (birch etc.) will be planted when a log is broken.
    Version 1.53
    • Material under the sapling is now protected as well.
    Version 1.51
    • Updated for 670
    Version 1.50
    • Huge rewrite.
    • Moved config to yml
    • Config auto creates itself.
    • Text messages added.
    • Trees replant when burned down.
    • Added sapling protection.
    • Assured that there is no memory leak on my end and there never was one.
    Version 1.03

    • Changed up the timer system.
    Version 1.02

    • Renamed config file
    • Moved config file to better match plugin name
    Version 1.01

    • Removed .bukkit namespace
    Version 1.0

    • Finally made the message optional as it can get annoying when cutting down forests.
    • Plugin released.
    This was the first plugin I made for hMod way back in the day and I just never got around to releasing my plugins. I hope to get my more advanced plugins up here onto the forums in the next few days. Keep an eye out!
     
  2. Offline

    Daveyo

    pretty freakin cool
     
  3. Offline

    Hawox

    Thank you! It means a lot to me to hear someone say that. <3 I always saw plugins where admins had to define areas to be regrown on different timers and blah blah blah, too complex for the desired effect. The simplest path the the outcome is the best. Make something with no hassle so you don't have to worry about it later. As I say, "Code and forget."
     
  4. Offline

    \\slashies

    So no shit, there I was. On a new server, new to minecraft, and wondering what to do. Then the trees started replanting themselves.
    Now I spend my free time programing in Java mostly for the benefit of minecraft because I thought, "Perhaps I can too!"
    Nicely done. Don't need to have a plugin that does everything all the time with a million options. sometimes being good at one thing is NICE! Know what you are getting.
    ^.^
     
  5. Offline

    gazius

    I've always wondered why something like this hasn't appeared till now, looking forward to trying this out.
     
  6. Offline

    TnT

    Folder name within plugins dir should match name of your plugin - makes it easy on admins.
     
  7. Offline

    Hawox

    Oh right I forgot about that. Here let me fix that and upload a new version. All of my plugins use to be custom of a server I admined for a few months. It was easy for them to find all my stuff because it was in that folder. My bad! Fix will be up in a few minutes!

    ~Edit:
    Done!
     
  8. Offline

    Peter Pan

    Thank you, very useful plugin ( :
     
  9. Offline

    Phantom Index

    Yes. This makes it much easier to have our trees. The only thing I want to ask is.. what if someone didn't finish the tree?

    would it grow and connect?
     
  10. Offline

    Hawox

    Hmm... Well I never once saw a tree with a missing trunk so possibly no. I've never tried that so I'm not entirely sure on that one. That's a test on Notches code I might have to try some day.
     
  11. Offline

    Phaedrus

    Question: Does this grow the same type of tree that was chopped down?

    In fact, come to think of it, I'm not even sure how it works in minecraft itself... If you chop down a pine tree, how do you grow another one? Saplings always seem to grow the default tree. Mind you I haven't played much since 1.3
     
  12. Offline

    Phantom Index

    Good question..
     
  13. Offline

    Hawox

    From what I have seen there is no way to grow the other type of trees. Since my plugin merely plants a sapling and lets notches code do the rest, theres nothing I could do =/ However! If saplings do in fact grow if theres wood above them, this would lead to different logs on the same trunk which I find funny. xD
     
  14. Offline

    Kostronor

    It sadly does not work together with the Tree-chopping from Treehugger, can you add compatiblity?
     
  15. Offline

    Joeyy

    I got some questions before I am going to test this on my server:

    1. What happens if someone doesn't chop the whole tree?
    2. Do they also automaticly replant "user-planted" trees?
     
  16. Offline

    Phaedrus

  17. Offline

    Hawox

    Good idea! I'll add an option to only grow certain types if trees in different biomes! (Only saplings made by this plugin) Though I'll get to this after I get Quests up a bit. It seems there are some people waiting on some updates on it.

    @Kostronor I have no idea why something would interferer with it. I'll look into it when I update this!
     
  18. Offline

    seanth

    Sounds lovely. I'm definitely adding this to my server on my next update.
     
  19. Offline

    dslip

    Author,

    Please support the auto-updating plugin CraftBukkitUpToDate. To do so please provide a permanent direct link to the author of CraftBukkitUpToDate.

    The below is information they provide
    Show Spoiler

    My Plugin didn't supported, how i get it to work with CButD?
    Give me a permanent link to your Plugin, i will add it. That's all no changes at your SourceCode or something else, all I need is a permanent link to the newest version of your Plugin. A good place for this is http://www.dropbox.com/ or for OpenSource https://github.com/.


    I really enjoy using your plugin and would like to see it work well with the above listed 'updater' plugin.
     
  20. Offline

    Shenlong

    I would like to second this opinion! Good work on the plugin also!
     
  21. Offline

    Hawox

    Can do. I'm working away on quests atm. Dose this work with the newest build of Bukkit? I'll test after I update quests if I get no replys.
     
  22. Offline

    Shenlong

    I'm still on 440 (still working on making sure all my plugins can handle the update) but I'm pretty sure it works with the latest recommended build.
     
  23. Offline

    Hawox

    Okay thanks! I'll get most of my plugin managing done tomorrow. I just got back from the ER. I'm so hyped up on meds I can't really focus enough to update taht much.
     
  24. Offline

    Bjourk

  25. Offline

    Hawox

    Done. I was messing around with making different tree types but it would require too many timers to have my own sapling growing code. I could make the correct trees grow if bukkit added (or someone shows me something I missed when API scanning) a SaplingGrowEvent.

    @Bjourk Did.
     
  26. Offline

    BPCM

    The plugin automatically plants saplings perfectly, the only problem I'm having is that it does not inform the user that a new sapling is on the way. I have set the treeplanter_Telluser to true, and I am using Permissions v2.5.4. Is anyone else having this issue? or is one of my config files incorrect.
     
  27. Offline

    kalner123456

  28. Offline

    Kahl

    I am experiencing this also. We need permissions support.
     
  29. Offline

    Raspberry

    15:47:42 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-544-g6c6c30a-b556jnks (MC: 1.3)

    I'm receiving this error after extracting the ZIP file...


    Code:
    2011-03-20 15:44:40 [SEVERE] Could not load plugins/AutoPlant.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:260)
            at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:196)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:221)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:380)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:366)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:109)
            ... 11 more
    Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "hawox.treeplanter.TreePlanterBlockListener.<init>(Lhawox/treeplanter/Hawox_TreePlanter;)V" the class loader (instance of org/bukkit/plugin/java/PluginClassLoader) of the current class, hawox/treeplanter/Hawox_TreePlanter, and the class loader (instance of org/bukkit/plugin/java/PluginClassLoader) for resolved class, hawox/treeplanter/TreePlanterBlockListener, have different Class objects for the type hawox/treeplanter/Hawox_TreePlanter used in the signature
            at hawox.treeplanter.Hawox_TreePlanter.<init>(Hawox_TreePlanter.java:17)
            ... 16 more
    
     
  30. Offline

    Slugslug

    me to

    Code:
    2011-03-21 13:05:07 [SEVERE] Could not load plugins/AutoPlant_1.02.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:113)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:159)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:107)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:260)
        at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:196)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:221)
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:380)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:366)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:109)
        ... 11 more
    Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "hawox.treeplanter.TreePlanterBlockListener.<init>(Lhawox/treeplanter/Hawox_TreePlanter;)V" the class loader (instance of org/bukkit/plugin/java/PluginClassLoader) of the current class, hawox/treeplanter/Hawox_TreePlanter, and the class loader (instance of org/bukkit/plugin/java/PluginClassLoader) for resolved class, hawox/treeplanter/TreePlanterBlockListener, have different Class objects for the type hawox/treeplanter/Hawox_TreePlanter used in the signature
        at hawox.treeplanter.Hawox_TreePlanter.<init>(Hawox_TreePlanter.java:17)
        ... 16 more
    
     

Share This Page