SuperWheat
SuperWheat - Plants auto re-grow after harvesting!
Version v0.9
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 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
# 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!
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
Downloads/Source Code/Dev Builds
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
(Latest dev builds/bleeding edge builds) - - Dev builds from Jenkins
(Source code hosted on Github) - - Source Code
Future Plans (a.k.a. ToDo):
- noting, feature complete
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
Credits
@thescreem for the original plugin!
Banner
Feel free to use this banner!! :)
Donations
I'm very happy about any donation.
Support me & buy me some beer, this makes me happy and keeps me interested in this plugin.
Donation chain: -> I receive some money -> Buy coffee -> Work longer -> Faster Updates -> Your benefit!
There is a button on top of this page (right to the different tabs)
I'm accepting bitcoins, too! :)
Address: 1NnrRgdy7CfiYN63vKHiypSi3MSctCP55C
License
This plugin is released under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) license!
getting the same error as ll the rest in 0.6 error code caused by: Unacceptable character (0xfffd) special characters are not allowed in <string> postions 149
im having this error http://dev.bukkit.org/paste/5992/ i just installed v0.6 and havent changed the config at all thanks
@xGh0sTkiLLeRx
(1) Stock config created when plugin initializes. Only modification is removal of special chars in the "message:" line near the top
(3) I'm set for en_US.UTF-8, but I don't think the file is being written initially in that format when the plugin creates it...
(4) Yeah, I'm not modifying the config.yml other than to remove the multi-byte char at the beginning of the "message:" line at the beginning (4th line)
This is the default line:
message: §6[SuperWheat] That plant is not fully grown yet!
@Raxxon
Okay, please be so kind and do the following steps:
What you could try, too:
Stop the server, delete the whole SuperWheat folder, restart the server
Thanks in advance!
Same issue, same place, claims it's the 0.6 version. Nuked config file and recreated, no change. Removed special chars from config file and restarted, no change.
@Alexplanetst
Weird, Thx for the Info, I'll check what's wrong...
Edit Submitted 0.6, hopefully fixes this, too!
I'm having the exact same issue as Procnole with character 149. Just thought I'd let you know this isn't an isolated incident. Best of luck.
Edit: I was messing around with a bit of it, and I realized it resets the config every time I start up the server.
@procnole
Delete your config please, of this doesn't solve the error, I'll take a closer look at character at the position 149
I get this on first start.. [SEVERE] Cannot load plugins/SuperWheat/config.yml org.bukkit.configuration.InvalidConfigurationException: unacceptable character '�' (0xFFFD) special characters are not allowed in "<string>", position 149 at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55) at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:138) at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:105) at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:175) at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:117) at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:111) at de.dustplanet.superwheat.SuperWheat.onEnable(SuperWheat.java:52) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:365) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:265) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:247) at net.minecraft.server.MinecraftServer.i(MinecraftServer.java:296) at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:275) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:225) at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:140) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:376) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) Caused by: unacceptable character '�' (0xFFFD) special characters are not allowed in "<string>", position 149 at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:70) at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:50) at org.yaml.snakeyaml.Yaml.load(Yaml.java:399) at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:53) ... 17 more 23:55:33 [SEVERE] Cannot load configuration from stream org.bukkit.configuration.InvalidConfigurationException: unacceptable character '�' (0xFFFD) special characters are not allowed in "<string>", position 149 at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:55) at org.bukkit.configuration.file.FileConfiguration.load(FileConfiguration.java:138) at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(YamlConfiguration.java:202) at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:121) at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:111) at de.dustplanet.superwheat.SuperWheat.onEnable(SuperWheat.java:52) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:365) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:265) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:247) at net.minecraft.server.MinecraftServer.i(MinecraftServer.java:296) at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:275) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:225) at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:140) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:376) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) Caused by: unacceptable character '�' (0xFFFD) special characters are not allowed in "<string>", position 149 at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:70) at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:50) at org.yaml.snakeyaml.Yaml.load(Yaml.java:399) at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:53) ... 16 more
@xGh0sTkiLLeRx
Yeah those names aren't really intuitive figured that was the problem. Thanks for the quick update it's working really good now.
@baramos123
Ahh.
Confusing names!
Please re-download it (fixed, but still 0.5)
@xGh0sTkiLLeRx
Found a bug while building a nether wart farm. When you go to harvest it via punching or pistons (haven't checked water) it drops nether warts (115) which is the plant block instead of nether stalk (372) which is what should drop.
@xGh0sTkiLLeRx
Works perfect thanks for the quick update. Time for me to go design some new auto-harvesting/collecting farms for cocoa beans/nether wart.
@baramos123
Updated!
Dropbox and github are up to date, I have to wait for an approval here!
BREAKING! Please delete the config once!
@xGh0sTkiLLeRx
I hope the functionality won't be to complicated to implement if you decide to add it, I look forward to it.
@baramos123
Great idea!
I'll see what I can do!
Very useful plugin for setting up a fully automated wheat farm works perfectly and have had zero issues once I got the timing I needed set. I was wondering now that 1.3.1 is out if it would be possible to add similar functionality too cocoa beans and netherwart, where they can replant themselves as well when broken via a piston and or water.
@Wizards1234
Great. Thx for the fix!
Dear xGh0sTkiLLeRx,
Just wanted to say that the BIT.LY Dropbox link is broken. You forgot an "E"
You currently have "http://bit.ly/superwhatdropbox" when it needs to be "http://bit.ly/superwheatdropbox"
Just wanted to point it out,
Wiz
@zerobog
As stated above, please use a permission system. Otherwise only OPs are able to use it...