promotional bannermobile promotional banner

PetProtector

Abandoned
PetProtector

File Details

PetProtector v1.0

  • R
  • Oct 12, 2012
  • 19.25 KB
  • 936
  • CB 1.3.2-R1.0

File Name

PetProtector.jar

Supported Versions

  • CB 1.3.2-R1.0

--------------------- Boring stuff:

This plugin is protected under the GNU GPLv3 license.

--------------------- Installation:

Drop in "plugins" and restart your server! The config will appear as per normal.

--------------------- Permissions:

petprotector.cmd: .* - Permissions to all commands .protected - Permissions to command /pet protected .mobtype - Permission to command /pet mobtype .info - Permission to command /pet info .version - Permission to command /pet version - Overriden by the player 'boar401s2'

petprotector.admin: Access to everything You can also use petprotector.* for the same result.

For example: petprotector.cmd.protected will give you permission to use the /pet protected command. --------------------- Theory:

This plugin works on whether the player is able to build where they are standing - via worldguard. For example: If I find some sheep on a protected land that I can't build on, then I am not able to hurt them. Since the 'passthrough' flag on worldguard allows any players to create/destroy/access any blocks on the specified region, then it will also allow animals to be hurt on that region.

--------------------- Commands:

/pet protected <Region Name> [true/false]

When this command is executed with "true" then it sets the protection with the default mobs (check config). When this command is executed with "false", it removes all protected mobs from the region, although not deleting the region in the database. Every protection is protected by default.

/pet add <Mob Type> <Region Name>

This command adds an animal/mob to be protected on a region, for example: "/pet add CREEPER MyTestRegion", It will mean that any creepers on the protection MyTestRegion will be protected.

/pet remove <Mob Type> <Region Name>

This command removes an animal/mob to be protected on a region, for example: "/pet remove PIG MyTestRegion", It will mean that any pigs on the protection MyTestRegion will NOT be protected.

/pet version

This will tell you the version of PetProtector

/pet info <Region Name>

This is one of the most useful commands, it tells you what mobs are protected in the specified region, and if you are able to hurt them or not.

--------------------- Configuration:

There is only one node in the config.yml, which is:

DefaultProtectedAnimals: CHICKEN COW IRON_GOLEM MUSHROOM_COW OCELOT PIG SHEEP SNOWMAN VILLAGER WOLF

This specifies what mobs should be protected automatically. So, when a region is created, what mobs should be protected in it by default. These values are just the mob's name (see list below) seperated by a Space (" ").

--------------------- Mob Names:

These are the names of valid mobs that can be protected, they are the default names as used by CraftBukkit/Bukkit:

Blaze CaveSpider Chicken Cow Creeper EnderDragon Enderman Ghast Giant IronGolem MagmaCube MushroomCow Ocelot Pig PigZombie Player Sheep Silverfish Skeleton Slime Snowman Spider Squid Villager Wolf Zombie

--------------------- Misc:

Inside the /plugins/PetProtector/ there is a file called "prots.db". This file stores all the protection information. So, which mobs are protected in what regions. You are able to destroy this file, however, (provided you left the plugin in) all the protections will then protect the default mobs.

The plugin / information shouldn't suffer any ill effects if the server crashes, as it saves all the values to the file as soon as you have changed any settings.

-----------------------

Credits:

Author, Maintainer, and Mastermind: John 'boar401s2' Board Guy with the ideas: Timsandtoms, Admin and Owner of Timgaming.com