[INACTIVE] RegrowingSheepcoat v1.1.5 - Shorn sheep regain their wool after a while/Sheepfarm [1576]

Discussion in 'Inactive/Unsupported Plugins' started by Fensterbank, Sep 24, 2011.

  1. Offline

    Fensterbank

    RegrowingSheepcoat - Shorn sheep regains their wool after a while. Great for a sheepfarm
    Version: v1.1.5

    Normally, shorn sheep doesn't regain their wool.
    In Minecraft 1.8.1, animals doesn't despawn anymore.
    The result of this: after a while there are a lot of shorn sheep on the streets, which have to be killed. But really, this is barbarous!

    With this plugin, shorn sheep regains their wool after 30 minutes.
    So it is possbile to create useful sheep farms.

    Of course, the fur color of a coloured sheep will remain the same. :)

    Additional info:
    For the big minecraft server and community ultimine.net I added the functionality of this plugin to the main workflow plugin. Because this could be really useful for other server admins, I decided to split this function to an own plugin and distribute it here.

    Important:
    In the new release of Minecraft 1.0.1, jeb added the feature of wool regrowth to sheep.
    This means, you don't need this plugin anymore for having non naked sheeps.
    But you can use this plugin without problems in the new version of Minecraft.
    https://twitter.com/#!/jeb_/status/142633682224680960


    Features:
    • Shorn sheep will be hold in a cache and regain their fleece after 30 minutes
    • Player will be optionally informed, if a sheep shorn by him regains fleece .
    • Player will be optionally informed, if a sheep shorn by him died, whats the cause and when it would have regain wool. If it was killed by a player, he will be informed by which player it was killed.
    • Player will be optionally informed, if he killes a sheep shorn by another player and when its wool would have been regain.
    • It's possible to list all shorn sheep or to filter by a player.
    • It's possible to regrow wool of sheep in cache manually.
    • If a sheep is currently in a not loaded chunk, it will stay in cache and marked red in the list.
    • Permission support for Permissions 3.1.x and PermissionsEX
    • Multilanguage support with two language packs by default. Other language packs can be added easily.
    • Configuration file
    Commands:
    /ssheep - Lists all shorn sheep currently in the cache
    /ssheep <Playername> - Lists all shorn sheep of a player currently in the cache

    /ssheep regrow - Regrows the fleece of all sheep shorn by the player currently in the cache.
    /ssheep regrow <Playername> - Regrows the fleece of all sheep shorn by the given player currently in the cache.
    /ssheep regrow all - Regrows the fleece of all shorn sheep currently in the cache.

    /rs changelanguage <de|en> - Changes the current used language to the given language pack
    /rs reload - Reloads the configuration file


    Requirements:
    This plugin uses the new configuration API, so it requires the bukkit build 1337 or higher to work.
    It has been successfully tested with Bukkit build 1576 and PermissionsEx 1.16


    Permissions:
    regrowingsheepcoat.shearedsheep - Allows to show the cache of shorn sheep
    regrowingsheepcoat.shearedsheep.others - Allows to show a filtered view of the cache
    regrowingsheepcoat.regrow.own - Allows to let the fleece of the own sheep regrow manually
    regrowingsheepcoat.regrow.others - Allows to let the fleece of the sheep shorn by a specific player regrow manually
    regrowingsheepcoat.regrow.all - Allows to let the fleece of all shorn sheep in the cache regrow
    regrowingsheepcoat.admin - Used to change language or reload the configuration file


    Important information:

    The cache, red marked sheep and unloaded chunks:
    The plugin holds all shorn sheep in a cache, to hold persistent mapping between player, time and sheep. If a sheep is in a unloaded chunk, it cannot be find by the plugin. In this case, it can't regain wool and will be marked red in the cache list. Sheep in unloaded chunks will be hold as long in the cache, as they have to be.


    Multilingual support:
    This plugin has a multilingual support. On first start, the language files de.yml and en.yml will be generated for German and English language. Additional languages can easily be added to the language folder.
    The language can easily be changed by a command.

    Download:
    Download the current version here

    Changelog:
    Version 1.1.5
    • Fixed a bug, where the configuration file has been overwritten with the current loaded configuration on disabling the plugin.
    • Added the command /rs reload for reloading the configuration
    • Updated for PermissionsEx 1.16 and tested with Bukkit Build 1576
    Version 1.1.4
    • Fixed a bug, that the configurable minutes to wool regrow was only affected in the messages, not in the function. :)
    Version 1.1.3
    • Implemented a setting to define a time in minutes after wool of shorn sheep regrows
    • Implemented a setting to enable or disable the check for new version and/or its information message.
    Version 1.1.2
    • Fixed a bug occuring on a sheeps death
    • Improved configuration handling
    • If a new version is available, it will be written to the logfile on startup
    Version 1.1.1
    • Fixing Bugs caused by the changes to Version 1.1.0
    • Removed useless spam in log file
    Version 1.1.0
    • Added configuration file to store the current language pack and enable or disable different notifications.
    • The cache of shorn sheep is now persistent and will be stored to a file.
    • Improved English language pack. (Thanks a lot to Seán Ó Séaghdha)
    • Changed the command /shearedsheep to /ssheep
    • Support for Bukkit build 1337
    Version 1.0.9 BETA
    • Added multilingual support
    • Added permission support
    • Added commands for listing the cache and regrow fur manually
    • Don't forget sheep in unloaded chunks, which cannot regain fur
    • Support for Bukkit build 1240
    Version 1.0.0
    • Split the function from the ultiMinePlugin v0.2.11 to an own plugin and released it here
     
    Xordaii, GameFAQsRolo and Sepulzera like this.
  2. Offline

    Plague

    wait, did Notch remove the regrowth in some version?
     
  3. Offline

    RugRats

    He did it was in 1.6 I think, All I know is that he did.
     
  4. Offline

    SharkWipf

    Exactly what we needed. Thanks.
     
  5. That explains all the sheared sheep on my server!
     
  6. Offline

    Fensterbank

    Hi,

    sorry, the plugin is not working at the moment correctly, because it ignores sheeps in not loaded chunks whoose fur cannot regrow.
    The last two days I worked on a major bugfix release and solved this problem.

    I will release this version this evening (ca. 21:00 GMT+1), stay tuned. :)
     
  7. Offline

    cwingrav

    Your download is a zip file containing class files and all files needed for the jar, but it is not a jar. Could you pack it as a jar to make it easier to install? TY. Looking forward to using the plugin.
     
  8. Offline

    Fensterbank

    It was a .zip-File, containing a .jar-File.
    But with the release of a better working version, I changed the download link, know you only download a .jar-File.
    _____________
    Have fun with the new Version.
    I'm happy to hear problems and bugs. :)
     
  9. I know this isn't your top priority right now, but can I make some suggestions about language?

    "Sheared" is OK in the US, but it sounds really odd to an Australian and no doubt British speakers. For us once you shear a sheep, it's "shorn". So maybe you need an en-uk.yml as well.

    The command /shearedsheep is a bit long to type as well - maybe /ssheep or /sheepsh would be better? Not hugely important as it can always be aliased.

    Another thing that sounds a bit strange is "fur". Sheep only have "wool" or "fleece", never fur.

    I wonder if you really need to use the word "player" before each player name. I'm a big fan of using simple direct language but maybe the value in this case is to give translators a context.

    Here are my suggested changes to the language packs (changed versions attached):

    en-US.yml (the default I suppose)
    {commands.shearedsheeplist: There are % sheared sheep in the cache., log.shearedsheeplist: Player % called the list of sheared sheep.,
    log.shearedsheeplist.other: Player %1 called the list of sheared sheep sheared by player %2.,
    log.commanddenied: Command %2 has been denied to player %1., system.enabled: '%
    successfully enabled.', system.disabled: '% successfully disabled.', system.permissionfound: 'Permission
    system found: %', system.permissionnotfound: No permission system found!, commands.commanddenied: You don't have the permission to do this.,
    commands.regrow.own: The fur fleece of your sheared sheep is has regrown., commands.regrow.other: The fur fleece of the sheared sheep of sheared by player % is has regrown.,
    commands.regrow.all: The fur fleece of all sheared sheep is has regrown., system.currentlanguagepack: 'Used Using language pack: %', commands.admin.changelanguage.success: Used lLanguage pack successfully changed.,
    commands.admin.changelanguage.fail: 'Couldn''t changed used language pack. Is language
    pack % installed?', playerinformation.regrow: The fur fleece of your sheep % is has regrown.,
    playerinformation.sheepdeath: Your sheared sheep %1 died just now caused by %3. The fur Its fleece would had have been regrown in %2.,
    playerinformation.sheepdeath.playerkill: Your sheared sheep %1 had has been killed by %3. The fur Its fleece would had have been regrown in %2.,
    playerinformation.sheepdeath.playerkill.own: You have killed your own sheared sheep %1 just now. The fur Its fleece would had have been regrown in %2.,
    playerinformation.sheepdeath.playerkill.killermessage: Just now yYou just killed a sheep sheared by %1. The fur Its fleece would had have been regrown in %2.}

    en-UK.yml
    {commands.shearedsheeplist: There are % sheared shorn sheep in the cache., log.shearedsheeplist: Player % called the list of sheared shorn sheep.,
    log.shearedsheeplist.other: Player %1 called the list of sheared sheep shorn by player %2.,
    log.commanddenied: Command %2 has been denied to player %1., system.enabled: '%
    successfully enabled.', system.disabled: '% successfully disabled.', system.permissionfound: 'Permission
    system found: %', system.permissionnotfound: No permission system found!, commands.commanddenied: You don't have the permission to do this.,
    commands.regrow.own: The fur fleece of your sheared shorn sheep is has regrown., commands.regrow.other: The fur fleece of the sheared sheep of shorn by player % is has regrown.,
    commands.regrow.all: The fur fleece of all sheared shorn sheep is has regrown., system.currentlanguagepack: 'Used Using language pack: %', commands.admin.changelanguage.success: Used lLanguage pack successfully changed.,
    commands.admin.changelanguage.fail: 'Couldn''t changed used language pack. Is language
    pack % installed?', playerinformation.regrow: The fur fleece of your sheep % is has regrown.,
    playerinformation.sheepdeath: Your sheared shorn sheep %1 died just now caused by %3. The fur Its fleece would had have been regrown in %2.,
    playerinformation.sheepdeath.playerkill: Your sheared shorn sheep %1 had has been killed by %3. The fur Its fleece would had have been regrown in %2.,
    playerinformation.sheepdeath.playerkill.own: You have killed your own sheared shorn sheep %1 just now. The fur Its fleece would had have been regrown in %2.,
    playerinformation.sheepdeath.playerkill.killermessage: Just now yYou just killed a sheep sheared shorn by %1. The fur Its fleece would had have been regrown in %2.}


    I'm happy to check your English in future if you need me to.

    Thanks for this plugin, by the way. It makes no sense that this isn't in the game!
     

    Attached Files:

    Hopium likes this.
  10. Offline

    Klotzonator

    Thanks a lot for this plugin, I've got it on my server and it's working like a charm :)
     
  11. Offline

    NeonJ

    Is it possible to disable the messages? This plugin could be useful but the messages make it a bit odd.
     
    fiskh likes this.
  12. Offline

    fiskh

    I was wondering about the same things, I'm guessing this could easily be set up using some kind of Permissions-addon, or just editable through a configuration-file?
     
  13. Offline

    Fensterbank

    Thanks for your suggestions.
    I just released a new version!
    _____________

    @Seán Ó Séaghdha: Thanks a lot for your corrections.
    I looked up in a dictionary and it's right: Of course shorn is the right word.
    But I don't see any reason to use two english language packs, because "sheared" in this case makes also no sense in american english. :)
    I changed the default english language pack to your corrected version.

    The Command for looking up the shorn sheep has been changed to /ssheep
    ____________________

    From now on, the plugin has a config file.

    The chosen language is persistent now and - like NeonJ and fiskh suggested - the notifications (Fleece is regrown / Sheep died / You killed a sheep of...) can be enabled or disabled in the config file.
    Because I forgot a "reload" function at the moment, you should edit the config file when the server is stopped, otherwise, it would have been overwritten on reload with the current settings. ;)


    Have fun with the new release!
     
  14. Offline

    Jerther

    I use 1.1.0. the pluggin doesnt seem to load and I get this when I use /ssheep form the console:

    Code:
    21:19:27 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'ssheep' in plugin RegrowingSheepcoat v1.1.0
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:358)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:354)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:506)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:485)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.NullPointerException
            at Fensterbank.RegrowingSheepcoat.RegrowingSheepcoat.onCommand(RegrowingSheepcoat.java:129)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
            ... 7 more
    
     
  15. Offline

    diannetea

    error, bukkit 1337 with the latest version of the plugin :(
    Show Spoiler

    2011-10-22 04:22:02 [WARNING] Task of 'RegrowingSheepcoat' generated an exception
    java.lang.NullPointerException
    at Fensterbank.RegrowingSheepcoat.Manager.SheepManager.checkAndResetShearedStatus(SheepManager.java:164)
    at Fensterbank.RegrowingSheepcoat.RegrowingSheepcoatScheduler.run(RegrowingSheepcoatScheduler.java:25)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:441)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  16. Offline

    Fensterbank

    Ouh, sorry. I didn't get this Bugs in my tests.
    It was caused by the changes to version 1.1.0, so that a NullPointerException occured if the Player of a shorn sheep isn't online.
    It should be fixed now in the Version 1.1.1
     
    diannetea likes this.
  17. Offline

    Jerther

    I still have this error with 1.1.1

    Code:
    08:54:23 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'ssheep' in plugin RegrowingSheepcoat v1.1.1
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:358)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:354)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:506)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:485)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.NullPointerException
            at Fensterbank.RegrowingSheepcoat.RegrowingSheepcoat.onCommand(RegrowingSheepcoat.java:129)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
            ... 7 more
     
  18. Offline

    Fensterbank

    Because I use the new configuration API in the plugin, it requires bukkit build 1337 to work.
    I added this advice to the main thread.

    I also released version 1.1.2 with another bug fixes and improvements.
     
  19. Offline

    Hopium

    @Fensterbank thanks for this plugin, now that friendly mobs are persistent this is a must have. and thank you for keeping it updated we all appreciate it :p
     
    Fensterbank likes this.
  20. Offline

    Carne

    Good mod, and now with the latest update, its even great!
     
    Fensterbank likes this.
  21. Offline

    Sepulzera

    Could you implement a setting to modify the time it takes to regrow the wool of a sheep?
     
  22. Offline

    CreepyGhast

    I have the same request :)
     
  23. Offline

    Fensterbank

    Yes, I implemented it.
    Version 1.1.3 is released. :)
     
  24. I haven't been able to get the timer in the config to work. I tried various numbers, then I have tried (using bukkit #1337) to set your config timer so that it should be 1min for sheep to regrow, still takes a long time - not sure how long, I wasn't really watching, probably still 30mins. It was a very long time anyway.
    Setting in config was :
    minutestowoolregrow: 1
    A good mod though - I always thought sheep were meant to regrow their wool after eating grass. I've never seen this happen, except in the Aether - works up there. I would like to reduce the time a little if possible though please.
    [Edit]
    Just timed it, and it is taking 30mins for sheep to be 're-wooled' - even with the above setting in the config. Hopefully you'll be able to assist please .........
     
  25. Offline

    Fensterbank

    Hi,
    thanks for you reply. I will look for the problem this evening (UTC +1).

    Okay, sorry, my fault. I fixed it. :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  26. Excellent - just tested (Bukkit #1337) - your config timer is now working perfectly. My thanks for fixing it.
    Interestingly, your re-fleecing of the sheep has an advantage over the Aether's way, if you de-fleece an Aether sheep of any colour, it'll always regrow a white coat, whereas yours maintain their original colour and re-grow exactly the same. Great mod ....... many thanks ... and now saves me having to go around needlessly slaughtering innocent sheep.
    I'm using TieDyeSheep and your mod works great with it - giving me re-coated multi-coloured sheep.
     
    Fensterbank likes this.
  27. Offline

    GameFAQsRolo

    Thanks for the plugin. It's working great so far. I'm running 1.1.4 on CB #25 1.9 pre5. It took a little bit of legwork to 'take care of' all the existing naked sheep, but all the new sheep are regrowing wool perfectly.

    *EDIT*
    Show Spoiler

    No longer working on CB #30 1.9 pre5. It throws the following NPE on startup:
    Code:
    2011-11-13 12:46:10 [SEVERE] Error occurred while enabling RegrowingSheepcoat v1.1.4 (Is it up to date?): null
    java.lang.NullPointerException
        at org.bukkit.plugin.java.JavaPlugin.getResource(JavaPlugin.java:156)
        at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:133)
        at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:125)
        at Fensterbank.RegrowingSheepcoat.RegrowingSheepcoat.setupConfig(RegrowingSheepcoat.java:115)
        at Fensterbank.RegrowingSheepcoat.RegrowingSheepcoat.onEnable(RegrowingSheepcoat.java:55)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:183)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:176)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:159)
        at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:333)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:320)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:157)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:384)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:454)
     
  28. Offline

    Yaeld

    Tanks for that plugin!

    I think the addition of a permission node that restrict the wool regrow could be a nice idea! If someone have the permission (regrowingsheepcoat.allowregrow for example) the sheep is added to cache, otherwise it remain a normal sheep that isn't monitored by tyour plugin.

    By the way it run without any problems on 1.0.0 with the last CB (1522)
     
  29. Why would you need permission for a sheep to regrow its wool? Do you need permissions for plants to grow? Do you need permissions for the sun to rise?

    Surely this plugin is just fixing something that is missing from MC. It's about fixing sheep, not giving special abilities. Why complicate it?
     
  30. Offline

    Sepulzera

    For me it isn't. It tries to save the default settings on startup / reload.
    Workaround is to set the file write-protected, however I get now the error on startup that it can't save the file :D
     

Share This Page