[MECH/MISC] SuperWheat v0.9 - Plants auto re-grow after harvesting! Carrot, Potato [1.5.1-R0.2]

Discussion in 'Archived: Plugin Releases' started by xGhOsTkiLLeRx, Mar 26, 2012.

  1. Offline

    xGhOsTkiLLeRx

    SuperWheat - Plants auto re-grow after harvesting!
    Version: v0.9

    <font color="#ff0000">BukkitDev: Click!</font>

    Description:

    This plugin allows to the automatic re-planting of specific plants like wheat, nether warts, carrots, sugar cane, potatoes & cocoa (plants).
    It supports different harvesting modes, by a player (permission checks), water or a piston.
    Additionally you can limit if the plants should be destroy-able by a piston or water; or prevent players to destroy not fully grown plants.
    It's a rebirth of SuperWheat from @thescreem
    The code is rewritten, but all credit of the idea and the original plugin goes to thescreem!

    Ships with a config & permissions!

    Features:
    * Support of different plants

    - * wheat
    * nether warts
    * cocoa (plants)
    * carrots
    * potatoes
    * sugar canes
    - Players can't destroy your plants until they're fully grown.
    - Once you harvest the plant, the plant is automatically re-planted.
    - Supporting three harvesting methods
    * Player (also able to check permissions)
    * Water
    * Pistons
    - Configure what the creative guys are allowed to do
    - Uses the seeds out of the inventory again! (Only when broken by a player, permission to bypass it!)
    - Enable or disable trampling of plants
    - Command for reloading
    - MultiWorld support

    Config:
    Code:
    # For help please either refer to the
    # forum thread: http://bit.ly/superwheatthread
    # or the bukkit dev page: http://bit.ly/superwheatpage
     
    # Message which should be displayed while trying to destory a pre-mature plant
    message: '&6[SuperWheat] That plant is not fully grown yet!'
    # Should the message above be displayed
    message-enabled: true
    creative:
      # Should there be drops in creative mode
      dropsCreative: false
      # Prevent the destroying of plants in creative mode
      blockCreativeDestroying: false
    wheat:
      # Plugin enabled for wheat?
      enabled: true
      # Trampling of wheat is still enabled
      trampling: true
      # How long should be the delay until the wheat re-appears (punching)
      delayHit: 3
      water:
        # How long should be the delay until the wheat re-appears (water flow)
        delay: 5
        drops:
          # Which things should be dropped?
          wheat: true
          seed: false
        # Prevent water from destroying plants
        prevent:
          premature: true
          mature: false
      piston:
        # How long should be the delay until the wheat re-appears (piston push)
        delay: 5
        drops:
          # Which things should be dropped?
          wheat: true
          seed: false
        # Prevent the piston from destroying plants
        prevent:
          premature: true
          mature: false
    # Please see the commented section for wheat above - same system for nether warts
    netherWart:
      enabled: true
      delayHit: 3
      water:
        delay: 5
        drops:
          netherWart: true
        prevent:
          premature: true
          mature: false
      piston:
        delay: 5
        drops:
          netherWart: true
        prevent:
          premature: true
          mature: false
    # Please see the commented section for wheat above - same system for cocoa plants
    cocoaPlant:
      enabled: true
      delayHit: 3
      water:
        delay: 5
        drops:
          cocoaPlant: true
        prevent:
          premature: true
          mature: false
      piston:
        delay: 5
        drops:
          cocoaPlant: true
        prevent:
          premature: true
          mature: false
    # Please see the commented section for wheat above - same system for carrots
    carrot:
      enabled: true
      trampling: true
      delayHit: 3
      water:
        delay: 5
        drops:
          carrot: true
        prevent:
          premature: true
          mature: false
      piston:
        delay: 5
        drops:
          carrot: true
        prevent:
          premature: true
          mature: false
    # Please see the commented section for wheat above - same system for potatoes
    potato:
      enabled: true
      trampling: true
      delayHit: 3
      water:
        delay: 5
        drops:
          potato: true
        prevent:
          premature: true
          mature: false
      piston:
        delay: 5
        drops:
          potato: true
        prevent:
          premature: true
          mature: false
    # Please see the commented section for wheat above - same system for sugar canes
    # Special note: the plugin doesn't check if the block is fully grown or not!
    sugarCane:
      enabled: false
      delayHit: 3
      water:
        delay: 5
        drops:
          sugarCane: true
        prevent: false
      piston:
        delay: 5
        drops:
          sugarCane: true
        prevent: false
    
    Commands & Permissions:

    Only the bukkit permissions are supported! I highly recommend that you use a plugin for permissions like bPermissions or PermissionsEX (PEX)!!
    If no permission system is found, all permissions are for OPs only!


    Show Spoiler
    Command: /superwheat reload
    Aliases: sw, superw
    Description: Reloads the configuration on the fly
    Node: SuperWheat.reload

    SuperWheat.*
    Description: Includes all permissions

    SuperWheat.wheat.*
    Description: Includes all permissions for wheat

    SuperWheat.wheat.regrowing
    Description: Automatically re-grows the harvested wheat

    SuperWheat.wheat.destroying
    Description: Allows you to destroy not full grown crops

    SuperWheat.wheat.seeds
    Description: Drops seeds, too

    SuperWheat.wheat.noseeds
    Description: Allows auto re-plant if no seeds are in the inv

    SuperWheat.netherwart.*
    Description: Includes all permissions for nether wart

    SuperWheat.netherwart.regrowing
    Description: Automatically re-grows the harvested nether wart

    SuperWheat.netherwart.destroying
    Description: Allows you to destroy not full grown plant

    SuperWheat.netherwart.noseeds
    Description: Allows auto re-plant if no nether wart is in the inv

    SuperWheat.cocoaplant.*
    Description: Includes all permissions for cocoa (plant)

    SuperWheat.cocoaplant.regrowing
    Description: Automatically re-grows the harvested cocoa

    SuperWheat.cocoaplant.destroying
    Description: Allows you to destroy not full grown plant

    SuperWheat.cocoaplant.noseeds
    Description: Allows auto re-plant if no cocoa beans are in the inv

    SuperWheat.carrot.*
    Description: Includes all permissions for carrots

    SuperWheat.carrot.regrowing
    Description: Automatically re-grows the harvested carrots

    SuperWheat.carrot.destroying
    Description: Allows you to destroy not full grown plant

    SuperWheat.carrot.noseeds
    Description: Allows auto re-plant if no carrots are in the inv

    SuperWheat.potato.*
    Description: Includes all permissions for potatoes

    SuperWheat.potato.regrowing
    Description: Automatically re-grows the harvested potatoes

    SuperWheat.potato.destroying
    Description: Allows you to destroy not full grown plant

    SuperWheat.potato.noseeds
    Description: Allows auto re-plant if no potatoes are in the inv

    SuperWheat.sugarcane.*
    Description: Includes all permissions for sugar canes

    SuperWheat.sugarcane.regrowing
    Description: Automatically re-grows the harvested sugar cane

    SuperWheat.sugarcane.noseeds
    Description: Allows auto re-plant if no sugar canes are in the inv



    Download/Source Code/Dev Builds:

    [​IMG] (Latest recommend version on Dropbox) - - <Edit by Moderator: Redacted bit url>
    [​IMG] (Latest <font color="#ff0000">dev</font> builds/bleeding edge builds) - - <Edit by Moderator: Redacted bit url>
    [​IMG] (Source code hosted on Github) - - <Edit by Moderator: Redacted bit url>


    Future Plans (a.k.a. ToDo):
    * Open for suggestions...
    * Let water flow over/through wheat/crops -> I guess impossible :(

    Make sure to take a look at the always up to date ToDo!


    Known Bugs:
    * Message is sometimes displayed twice

    Changelog:

    Version 0.9
    * Added multiworld support
    * Added /superwheat reload command

    Version 0.8
    * Fixed hydration value of farmland ignored


    Show Spoiler
    Version 0.7
    * Added Carrots & Potatoes (fully working)
    * Added config option to disable the message
    * Added SugarCane -> no check if the plant is fully grown is performed
    * Tweaked code a little bit

    Version 0.6.1
    * Fixed nasty config bug!

    Version 0.6
    * Added permissions (.noseeds)
    * Added option that the plant is only re-planted if there are seeds in the player inv (only block break!)

    Version 0.5
    * Added cocoa plants and nether wart (request)
    * Added trampling toggle for wheat
    * New permissions -> BREAKING change

    Version 0.4
    * Added piston support
    * Re-structured the config file
    * Added a delay option (to all 3 variants)

    Version 0.3
    * Added permission to get seeds, too
    * Configure a bit about creative gamemode (drops, able to destroy)
    * Maybe a fix of crops not re-planting

    Version 0.2
    * Rewrote code
    * Added water prevention
    * "Localization" (only one message...)

    Version 0.1 (by thescreem)
    * Initial Release


    Credits:

    @thescreem for the original plugin!


    Banner:

    Feel free to use this banner!! :)

    [​IMG]
    [​IMG]


    Donations:

    If you really like my plugin, you can if you want make a donation via PayPal!

    [​IMG]

    License:

    This plugin is released under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) license!
    [​IMG]
     
    Last edited by a moderator: Feb 19, 2017
    Zenithas likes this.
  2. Offline

    md_5

    Nice post, approved
     
    xGhOsTkiLLeRx likes this.
  3. Offline

    Unearthlyxbox

    Hey, Great plugin, but I wanted to consult with a few potential bugs or errors on my part, whenever a user on my server would destroy a premature wheat block, no error message would pop up, and the plant would be destroyed. This is very annoying because this mod makes it a much harder task to obtain seeds. Is there any fix to prevent the destruction of premature wheat blocks, and to display the message "That crop isn't fully grown yet!"?
     
  4. Offline

    xGhOsTkiLLeRx

    Are you using a permissions system?
    Or are the player OPs?

    Because if they don't have the permissions SuperWheat.destroying they shouldn't be able to destroy a not fully grown (premature) wheat.
    Standard for the permissions is OP.
     
  5. Offline

    linx

    Nice plugin, it works great!

    I was curious however if there would be a way to allow the automatic regrowth of wheat when its harvested via other means (water, piston, light/dark). That would be awesome.
     
    WhiteWolf1145 likes this.
  6. Offline

    xGhOsTkiLLeRx

    Thanks :)

    Yeah, maybe I'll try to add some of your ideas ;)
     
    WhiteWolf1145 likes this.
  7. Offline

    WhiteWolf1145

    I second this please do an update with water
     
  8. Offline

    xDevidra

    Nice Plugin!

    But its possible to make a Permission, that allow to drop Seeds?

    Now its impossible to get any Seeds, I cut gras, make some Farmland, nothing work to get any Seeds, only Admin Command "give" gave me some Seeds..

    This would be perfect!

    maybe you can do > SuperWheat.getseed

    Thanks from Germany :)
     
  9. Offline

    xGhOsTkiLLeRx

    Normally you can destroy grass to obtain seeds.
    But I can add a permission, to get seeds :)

    Grüße aus Hamburg ;)

    Btw.

    Water won't destroy the crops. But it's not how I like it to be: Water flows over the crops and they are still there, I guess this is impossible...
     
  10. Offline

    xDevidra

    I cut of 100 Gras, no Seed, with and without other Plugins

    Im OP and NoOP with Admin Permission..

    Maybe a Bug in youre Plugin?
     
  11. Offline

    xDevidra

    Found a New Bug

    You can set Regions with World Edit/Guard, but Super Wheat ignore the "Region Permission"

    everybody can take the Wheat from the Region without Permission
     
  12. Offline

    xGhOsTkiLLeRx

    Shouldn't be a bug. Unless grass counts as crops, too.
    I'll check it anyway, but normally only crop "blocks" are effected.

    Could you provide more information on this problem?

    (Like an example [Player A without the destroy permission goes to Player B's farm and destroy some crops -> drops (which shouldn't drop)])
     
  13. Offline

    xDevidra

    The Problem with World Guard I can test later.. I need more Players cause I cant test it alone

    And you allready solved the Problem with the Seeds?
     
  14. Offline

    xGhOsTkiLLeRx

    If you break grass, it will drop seeds anyway. For the next version it's planned to have a permission node to auto-replant the crops and drop a seed and wheat.
     
  15. Offline

    xDevidra

    Ok tested on my Server, its work, on another Server from another Guy its dont work, nevermind, if I find the thing who is block this, i report it to you :)

    Idea:

    Permission for >

    Get Seeds from Crops
    Faster grown of Crops

    Permission for block destroy the Crops.. Im Admin with '*' Permission and I can destroy, maybe so I can block this :p
     
  16. Offline

    BobbyMcPhee

    You should make it configurable so that when wheat is broken it drops seeds, but when you use maybe shears or a hoe it doesn't and it replants them. I dunno just throwing ideas out there.
     
  17. Offline

    xGhOsTkiLLeRx

    Released a small update.

    Version 0.3
    • Added permission to get seeds, too
    • Configure a bit about creative gamemode (drops, able to destroy)
    • Maybe a fix of crops not re-planting

    New permission:

    SuperWheat.seeds
     
  18. Offline

    Papsern13

    Can you make it have a delay between breaking the wheat and placing the seeds because that would make it possible to make an automatic wheat farm using pistons.
     
  19. Offline

    xGhOsTkiLLeRx

  20. Offline

    Papsern13

    The delay thing works great, but I tried testing it with pistons and water and the crops don't grow back unless they've been harvested by a person. Could you try to make a configurable option to have the seeds regrow even if the wheat is broken by water? (I saw other people asking for something like this.)
     
  21. Offline

    xGhOsTkiLLeRx

    I see what I can do, but this would work for everybody, because I've to check it the block is broken -> no player did it -> no permissions

    Edit:

    Water works, pistons seems a bit more complicated
     
  22. Offline

    Papsern13

    I'm fine with just having water, and it doesn't matter about permissions for me because I'm using this on my private server. So have you got a download link for this new version?
     
  23. Offline

    xGhOsTkiLLeRx

  24. Offline

    Papsern13

  25. Offline

    Deleted user

    If a piston runs over the wheat, will it re-grow?
     
  26. Offline

    xGhOsTkiLLeRx

  27. Offline

    xGhOsTkiLLeRx

    Papsern13
    Update!
    Works on 1.3.1!

    Version 0.4
    • Added piston support
    • Re-structured the config file
    • Added a delay option (to all 3 variants)

    :D
     
    Deleted user likes this.
  28. Offline

    Deleted user

  29. Offline

    xGhOsTkiLLeRx

    I kept the vanilla behaviour.
    You can run "on" it and won't destroy it.
    But if you jump on it, it will get trampled.
     
  30. Offline

    Deleted user

    Can you add an option in the config for that? :D
     

Share This Page