animal /horse protection within world guard regions (source provided)

Discussion in 'Archived: Plugin Requests' started by craigbaines, Jul 2, 2013.

  1. Offline

    craigbaines

    Plugin category: Fun

    Suggested name: HorseProtection

    What I want: It's a pretty basic and probably mass request. My server runs on a plot rental / economy style...
    Id like to create a stable area, that players can rent out. An within it, there animals, and more specifically horses be safe from attack / bows & arrows.

    The link iv'e left does exactly what i want, it just doesn't include horses. The only down side to it is that it checks if a player can build or not, an when they can't, they can't attack animals...

    Thought that's helpful, it means players could just as easily place there horse anywhere within my city, or there own house plots, making my stables area almost pointless.

    Id prefer it if i could flag the stable region specifically with something like /region flag stables animal_protection true ?

    An have the plugin check for that rather than build rights?

    Anyway, if anyone can come up with something and if all else fails just update the plugin in the link or one similar to include horses, it would be much appreciated!

    Please add my skype to discuss! Name - Craig_b3



    Ideas for commands: No commands needed for this plugin. just working off a region flag?

    Ideas for permissions: i wouldnt need any perm, the only permissions id want is wheather or not players can rent the stables, which is handled with rent plugins.

    When I'd like it by: Yesterday.


    Source / inspiration : http://dev.bukkit.org/bukkit-plugins/animalprotect/
     
  2. Offline

    timtower Administrator Administrator Moderator

    craigbaines Please wait till we have an API to work with
     
  3. Offline

    craigbaines

    Just putting the idea for a simple plugin out there, dont need anything complex.
     
  4. Offline

    timtower Administrator Administrator Moderator

    craigbaines Still, we need an API to work with before we can do anything
     
  5. Offline

    craigbaines

    Understood, but im just putting the idea out there to the entire forum, not just you! :) Hopefully somebody will be interested
     
  6. Offline

    reesylou

    Adding the custom flag is easy to do (you will need WGCustomFlags plugin and then create a custom flag). Changing the mod to check that flag is also not difficult. I have not looked into adding horses to the mix as well, so do not know how difficult that is (would expect not hard).

    If I have a chance in the next few days (and no-one beats me to it), I'll do it for you.
     
  7. Offline

    chaseoes

    You can use AnimalProtect for this. Add "UNKNOWN" to the protect-from-player list.
     
  8. Offline

    reesylou

    Add "HORSE" .... but that doesn't take care of the requirement for a custom flag to only protect in a specified area instead of anywhere a player cannot build. (but as I said, adding a custom flag is not hard, but requires WGCustomFlags behind it)
     
  9. Offline

    timtower Administrator Administrator Moderator

    HORSE isn't known by the plugins yet
     
  10. Offline

    reesylou

    Yes it is... I looked in the code. This plugin is very forward compatible and it just compares the entity's type to the list of types in the config. So since HORSE is defined as a valid EntityType (by MC/bukkit) it is natively supported.

    code snippets (from the plugin):
    Code:
    String entity = event.getEntityType().toString();
    List<String> protect = plugin.getConfig().getStringList("protect-from-player");
    if(protect.contains(entity)){
    <does the build and bypass check etc here>
    }
    
     
  11. Offline

    bobeeb

    hi,
    is it possible to forbid horse riding in some worldguardregions or is there any plugin that can handle this?
     

Share This Page