Prevent mobs from Spawning in specific areas?

Discussion in 'Bukkit Help' started by VulGerrity, Feb 25, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    VulGerrity

    Hey all, I've built a building that when you enter it turns on all the lights, but turns them off when you leave. The problem is, if the lights are off, plenty of mobs spawn in this building. Is there anyway to prevent mobs from spawning in specific areas? could i use the wand tool to set a selection and then disable hostile mobs in the specified area?

    I wouldn't mind the mobs so much, but they spawn and they interfere with a lot of other redstone piston type things and completely break my machines.
     
  2. Offline

    rogvid700

    Yes, this is very possible, if you have WorldGuard installed, you can select the cuboid with WorldEdit and set a flag, such as to deny mob spawning. You must know how to set a region first. Simple select the cuboid, then type:
    /region define <Name> <g:group name)> or <playername>
    This gives group access to build in that area: g:Admin
    So now only the group "Admin" can build in that area.
    This gives player access to build in that area: VulGerrity
    So now only the player "VulGerrity" can build in this area.
    ~
    Once you have defined your region you can set a flag, to prevent mob spawning in that area..
    ~
    To do this, visit this page, it will tell you everything you need to know about setting flags. :)
    http://wiki.sk89q.com/wiki/WorldGuard/Regions/Flags
    ~
    The command for setting flags is:
    /region flag <id> <flag> [<value>]
    ~
    So in your case, let's say you name your region "house"
    the command would look something like this...
    /region flag house mob-spawning deny
    ~
    You have now prevented mobs from spawning in the area "house". Let me know if anything goes wrong, this should work.
     
    vobilli likes this.
  3. Offline

    VulGerrity

    Wow, thank you so much, that was a PERFECT explaination of what I needed to do. seems to be working no problem :)

    Thank you so much!
     
  4. Offline

    AndreaLibman

    I have a question, how do you prevent animals from spawning in your region but to allow them to spawn outside of the region? I tried the flags mob-spawning deny and denyspawn pig,chicken,cow etc. It says it worked but they still show up in my region.
     
  5. Offline

    Torkkar

    and how do I do all this with Essentials cause last time I used world guard it made the game unplayable cause it uses sticks, string, and such to operate its functions and essentials says it can do all this but doesn't tell me how to do it wish this was on the minecraft forum so I could ask the devs them selves but gotta beg my peers eh?
     
Thread Status:
Not open for further replies.

Share This Page