ProtectAnimals
Lightweight Anti Animalgriefing Plugin
ProtectAnimals
other language-versions/Andere Sprachversionen
What does this Plugin?
- - It's quite simple, neutral Animals and Villagers are completely protected by player damage, when either the player or the animal/villager is standing in a WorldGuard-Region, where the player cannot build.
- - Additionally tamed ocelots(cats) and tamed wolves(dogs) are protected, while untamed Mobs aren't protected
- - People, who cannot attack, can also not tie up an animal with a leash and not feed any animals(very smart griefers could produce a huge amount of animal, that would cause lags and that's not cool at all)
- - It's not possible to get on a horse, when you cannot build in a specific region and also you can't dismount, because if you would, your horse will be lost forever in that region :o and we don't want that!
- - Projectiles fired / thrown by Witches or Skeletons are blocked, when the animal/villager is standing in a WorldGuard Region(with the exception: the "global" - Region)
- - Creepers are harmless against protected animals and villagers. But you'll still get damage, so don't be so naive! :D
- - Players can throw Damage-Bottles all day long, but nothing will happen, except they are starting to throw healing pots....but hey this wouldn't get anyone mad :D!
- - Players are blocked from dyeing sheeps, when the player cannot build at the location of himself or the location of the sheep.
How to install ProtectAnimals:
- - Download the version of your choice
- - Place the .jar in your server-plugins directory
- - Either reload, restart or start your Server
- - Completed. Have fun, and stop slaughtering poor Animals
Which commands can i use?:
- - instead of "/pa" you can use "/protectanimals"
- - "/pa" shows available Commands
- - "/pa help" shows what kind of Entities are protected in WorldGuard Regions
- - "/pa info" gives Information about the Plugin(Author, etc...)
- - "/pa reload" reloads the config
- - "/pa leave" forces leaving a horse
- Permission nodes:
- - "ProtectAnimals.info" includes all commands that gives simple information
- - "ProtectAnimals.reload" gives acces to the "/pa reload" command
- - "ProtectAnimals.update" players with this node, will get update informationen
- - "ProtectAnimals.bypass.dye" allows people to dye a sheep everywhere
- - "ProtectAnimals.bypass.exit" allows people to jump off horses everytime
- - "ProtectAnimals.bypass.feed" gives permission to feed every animal
- - "ProtectAnimals.bypass.potion" allows members to throw bad potions at animals
- - "ProtectAnimals.bypass.rename" people can rename every animal
- - "ProtectAnimals.bypass.ride" allows people to jump on horses everytime
- - "ProtectAnimals.bypass.shear" allows people to shear a sheep everywhere
- - "ProtectAnimals.bypass.shoot" arrows, snowballs etc are not longer blocked
- - "ProtectAnimals.bypass.tie" people can tie up every animal
- - "ProtectAnimals.bypass.trade" people can trade with villagers
Config(v.1.10 and higher):
# The Config should look like this:
#
Config: updater: ShouldThePluginCheckUpdates?: true <- "true" let's the plugin check, if it's the latest version protected_Animals: sheep: false <- "false" means sheeps can be attacked, sheared, dyed, feeded, tied up and everything.. pig: true cow: false chicken: true <- "true" means that chickens are protected everywhere mushroom: false squid: false villager: true . . .
editable Messages within the configuration File(v.1.16 and higher):
- - you can now edit mostly every message that players can get from my plugin. Use the following codes to write with color:
- - &0 = BLACK
- - &1 = DARK_BLUE
- - &2 = DARK_GREEN
- - &3 = DARK_AQUA
- - &4 = DARK_RED
- - &5 = DARK_PURPLE
- - &6 = GOLD
- - &7 = GRAY
- - &8 = DARK_GRAY
- - &9 = BLUE
- - &a = GREEN
- - &b = AQUA
- - &c = RED
- - &d = LIGHT_PURPLE
- - &e = YELLOW
- - &f = WHITE
- - &k = MAGIC
- - &l = BOLD
- - &m = STRIKETHROUGH
- - &o = ITALIC
- - &n = UNDERLINE
- - &r = RESET
- - an Example: "&4Hello" will become a dark red text
- - you can also follow this link to look for colorcodes: Colorcodes
- World-Support(v.1.17 and higher):
- - You can protect only a few worlds or as much as you like to protect
- - Change the Text within the config and separate world with a ", "
- - EXAMPLE: " worlds: farming, world, world_nether, world_the_end"
- - You can also easily protect all worlds by writing "+ALL"
- - EXAMPLE: " worlds: +ALL"
Required Plugins:
- - for my Plugin you'll need WorldGuard
# Important Information!!!
#
- - The PlugIn normally searches for an update and opens a connection.
- - this Update-Check can be toggeled within the config.yml
- - the update-checker uses this Link to check the latest version:
- - https://api.curseforge.com/servermods/files?projectIds=65168
Known Issues:
- - if you use "PlotMe Animal" you have to write "/protectanimals ..." instead of "/pa ..."
ToDo List:
- - fix bugs
- - move it to spiggot
- - make it 1.8 ready(new mobs)
Servers that I support:
- - TheNation[german] - my Server
- - SpawnTown[english]
Feel free to send me ideas, problems or just nice messages, either via the comments or via a ticket :)
Thank you for reading, Sincerely Japu_D_Cret
PS: Thank you for 2000+ Downloads :) You are awesome!
Doesn't work with 1.10.2.
Isn't region already protecting any animal?
Am I right that it's not possible to override the config restrictions to
- kill certain animals
- kill animals
inside a protection ?
Please update to craftbukkit with spigot site to 1.8.3
Don't work on 1.7.9
[09:43:03 ERROR]: Could not pass event EntityDamageByEntityEvent to ProtectAnima
ls v1.21
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
va:299) ~[spigot1543.jar:git-Spigot-1543]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
a:62) ~[spigot1543.jar:git-Spigot-1543]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
ava:502) [spigot1543.jar:git-Spigot-1543]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
ava:487) [spigot1543.jar:git-Spigot-1543]
at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callEvent(Craf
tEventFactory.java:109 [spigot1543.jar:git-Spigot-1543]
at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callEntityDama
geEvent(CraftEventFactory.java:550 [spigot1543.jar:git-Spigot-1543]
at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.handleEntityDa
mageEvent(CraftEventFactory.java:463 [spigot1543.jar:git-Spigot-1543]
at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.handleLivingEn
tityDamageEvent(CraftEventFactory.java:572 [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.EntityLiving.d(EntityLiving.java:1009) [
spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.EntityLiving.damageEntity(EntityLiving.j
ava:683) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.EntityAnimal.damageEntity(SourceFile:145
) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.EntityHuman.attack(EntityHuman.java:936)
[spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java
:1175) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PacketPlayInUseEntity.a(SourceFile:55) [
spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PacketPlayInUseEntity.handle(SourceFile:
10) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:184
) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.ServerConnection.c(ServerConnection.java
:81) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:7
31) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:2
84) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:5
84) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java
:490) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6
28) [spigot1543.jar:git-Spigot-1543]
Caused by: java.lang.IncompatibleClassChangeError Found interface com.sk89q.wor
ldguard.protection.ApplicableRegionSet but class was expected
at me.japu_d_cret.main.EventSign.canBuild(EventSign.java:163) ~[?:?]
at me.japu_d_cret.main.EventSign.onEntityDamageByEntity(EventSign.java:2
49) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0
_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0
_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
.8.0_25]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
va:296) ~[spigot1543.jar:git-Spigot-1543]
... 21 more
Hey there.
Love the Plugin. Do you have any plans on updating to Spigot 1.8 / Worldguard 6.x ?
Greetings
EDIT: Sorry, just saw, it's already on your ToDo list. Thanks
@sigler
not anymore, i fixed it :) sorry i've been away quite a while, because i was and am currently busy with school and applying and such stuff :<
awww.. My image is broken :(
Could not pass event PotionSplashEvent to ProtectAnimals v1.21
[13:35:33 ERROR]: Could not pass event PotionSplashEvent to ProtectAnimals v1.21 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:299) [spigot-1593.jar:git-Spigot-1593] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [spigot-1593.jar:git-Spigot-1593] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1593.jar:git-Spigot-1593] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1593.jar:git-Spigot-1593] at org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory.callPotionSplashEvent(CraftEventFactory.java:342) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.EntityPotion.a(EntityPotion.java:93) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.EntityProjectile.h(EntityProjectile.java:155) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.World.entityJoinedWorld(World.java:1603) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.World.playerJoinedWorld(World.java:1578) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.World.tickEntities(World.java:1443) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.WorldServer.tickEntities(WorldServer.java:516) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:706) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [spigot-1593.jar:git-Spigot-1593] at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [spigot-1593.jar:git-Spigot-1593] Caused by: java.lang.NullPointerException at me.japu_d_cret.main.EventSign.onPotion(EventSign.java:499) [?:?] at sun.reflect.GeneratedMethodAccessor818.invoke(Unknown Source) [?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.7.0_65] at java.lang.reflect.Method.invoke(Method.java:606) [?:1.7.0_65] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:296) [spigot-1593.jar:git-Spigot-1593] ... 15 more
@JapuDCret
i was about to ask the same thing if there was a way to make it so people can killll animals in a certain region. there should be a way to add like white listing or black listing a region so animal protection would be off.
@rlpn
no it isn't possible.
WorldGuard doesn't offer a way to do so.
To make your wish come true i would need to
store all regions on my own and use another
plugin to make custom region flags possible.
Sorry for that
Is there a way I can make it so people can kill mobs in specific regions? Like if I have a mobspawner in a region and want players to be able to kill cows, can I add a flag in worldguard or something?
Could you add support for towny regions anmal protect? or some kind of independant economy price to protect an area?
@mattoo642
1.
wolves and ocelots are completely unprotected.
whereas dogs and cats are protected, when the player who wants to kill them cannot build there
2.
horses are for now completely protected...
i didn't made a difference between some who are tamed(with these hearts and stuff) and some who aren't..
but i think your idea is really clever, i've never thought of something like this
@JapuDCret
ok thanks for your answer.
Simple question : when you write "Additionally tamed ocelots(cats) and tamed wolves(dogs) are protected, while untamed Mobs aren't protected"
-> do you mean these animals are protected once tamed EVEN IF they're not in a protection region ? (ie: wherever they stand)Additionnal question : what about tamed horses ? are they protected too ?
thanks for your work !!
@JapuDCret
Thanks man! I look forward to it!
@mattoo642
i already tried to implement your idea, but it's not that easy.
the API of the faction plugin and worldguard itself are not as easy as they should be
hello,
you plugin looks great, and I know it has already been "requested" but it would be so nice if it was compliant with Factions, which does not permit to protect the animals (and no up to date plugin does at the moment).
thanks !!
@StiDJa @Greenman1805
i've made your wishes come true!
have a look at the new update, when the Bukkit stuff have approved it.
Isit possible to remove the message 'You are using the latest version' when logging into the server? Maybe just have a message when an update is available but no message at all if there isn't one?