PK
D META-INF/MANIFEST.MF MLK-.
K-*ϳR03 PK PK
ZsOD`qR R
config.yml# _ _
# /\ (_) | |
# / \ _ __ _ _ __ ___ __ _| |
# / /\ \ | '_ \| | '_ ` _ \ / _` | |
# / ____ \| | | | | | | | | | (_| | |
# /_/ \_\_|_|_|_|_| |_| |_|\__,_|_|
# | __ \| |
# | |__) | | __ _ __ _ _ _ ___
# | ___/| |/ _` |/ _` | | | |/ _ \
# | | | | (_| | (_| | |_| | __/
# |_| |_|\__,_|\__, |\__,_|\___|
# __/ |
# |___/
# ____ _
# | _ \ _ /\ (_)
# | |_) |_ _(_) / \ _ __ ___ ____ _ _ __
# | _ <| | | | / /\ \ | |/ _` \ \/ / _` | '_ \
# | |_) | |_| |_ / ____ \| | (_| |> < (_| | | | |
# |____/ \__, (_) /_/ \_\ |\__,_/_/\_\__,_|_| |_|
# __/ | _/ |
# |___/ |__/
#
###----------------------- Config ------------------------###
### Here are the configurable options for the plugin ###
### For help, contact me on my Bukkit page ###
### http://dev.bukkit.org/bukkit-plugins/animal-plague/ ###
### Suggestions are welcome! ###
###-------------------------------------------------------###
### DESCRIPTION ###
# The animal plague is designed to do two things.
# 1) Make the game harder by making it possible to lose herds
# of animals.
# 2) Keep lag down by killing animals when there are too many.
#
# Depending on the settings below, you can create an unstoppable
# plague that wipes out all animals in its path, or a small
# control plague that will only kill newly spawned animals when
# a herd gets too large. It is highly recommended that you
# configure your plague before setting it loose on the world.
# They currently configured plague is very contagious and will
# appear after only 20 animals are found inside a 20 x 20 x 20
# cube.
# This list is all animals that can catch the plague. All animals
# are effected equally. When ever I refer to "animals" I am
# refering to this list.
PlagueAnimals:
- SHEEP
- COW
- PIG
- CHICKEN
# Put the name of the cure item here.
# This item will cure an infected animal of the plague.
CureItem: MILK
# Enabling this option will cause infected animals to drop
# only rotten flesh upon death.
FleshDecay: false
# The plague works in stages.
# 1) Symptoms and weakness: During this stage the animal
# becomes weaker and symptoms will start to appear.
# 2) Spreading: During this stage the infected animal will
# start to infect others.
# 3) Death: In this stage the animal is killed.
# leave this off unless the plugin is not working.
# Use this to help report errors to me or fix them yourself.
Debug: false
### STAGE ZERO ###
# The amount of animals that need to be within a certain area for
# a plague to start.
AnimalAmount: 20
# This radius is centered at the newly spawned Animal.
Radius: 20 # This means a 20 x 20 x 20 cube
### STAGE ONE ###
# Use this setting to set the time between when an infected animal
# spawns and when its first visible symptoms appear. This time is
# measured in ticks. 20 ticks = 1 second
PlagueStartTime: 1200 # 1200 ticks = 60 seconds
### STAGE TWO ###
# The infection chance. The plague will try to infect a new animal
# every five seconds. This is the chance that an infection will
# occur. 0 means no chance and 100 means 100% chance.
InfectionChance: 0
### STAGE THREE ###
# The amount of time an animal will survive after having its
# first noticeable symptoms. An animals life span with the plague
# can be measured by adding the PlagueStartTime and
# the PlagueKillDelay.
#Measured in intervals of 5 seconds.
PlagueKillDelay: 9 # so 9 * 5 = 45 seconds delay.
# 45 + 60(PlagueStartTime) = 1 min and 45 sec life span.
# Congrats! You can now go watch you plague at work.PK
)D
.classpath
PK
DqU .project
AnimalPlague
org.eclipse.jdt.core.javabuilder
org.eclipse.jdt.core.javanature
PK
P)D6_R R
plugin.ymlname: AnimalPlague
main: com.redfootdev.animalplague.AnimalPlague
version: 0.4.1PK
*DЗ
. com/redfootdev/animalplague/AnimalPlague.class 3 (com/redfootdev/animalplague/AnimalPlague !org/bukkit/plugin/java/JavaPlugin org/bukkit/event/Listener radius I animalCount debug Z
plagueAnimals Ljava/util/List; Signature $Ljava/util/List; ()V Code
LineNumberTable LocalVariableTable this *Lcom/redfootdev/animalplague/AnimalPlague; onEnable
! " saveDefaultConfig
$ % & getConfig 3()Lorg/bukkit/configuration/file/FileConfiguration; ( Radius
* , + /org/bukkit/configuration/file/FileConfiguration - . getInt (Ljava/lang/String;)I 0 AnimalAmount 2 Debug
* 4 5 6
getBoolean (Ljava/lang/String;)Z 8
PlagueAnimals
* : ; <
getStringList $(Ljava/lang/String;)Ljava/util/List; >
@ A B getLogger ()Ljava/util/logging/Logger; D 3 -- Animal Plague Outbreak Identified. No Cure! --
F H G java/util/logging/Logger I J info (Ljava/lang/String;)V
L M N getServer ()Lorg/bukkit/Server; P R Q org/bukkit/Server S T getPluginManager #()Lorg/bukkit/plugin/PluginManager; V X W org/bukkit/plugin/PluginManager Y Z registerEvents 8(Lorg/bukkit/event/Listener;Lorg/bukkit/plugin/Plugin;)V onDisable ] -- Curing Animal Plague... -- onCreatureSpawn /(Lorg/bukkit/event/entity/CreatureSpawnEvent;)V RuntimeVisibleAnnotations Lorg/bukkit/event/EventHandler;
c e d *org/bukkit/event/entity/CreatureSpawnEvent f g
getEntityType ()Lorg/bukkit/entity/EntityType;
i k j org/bukkit/entity/EntityType l m name ()Ljava/lang/String; o q p java/util/List r s get (I)Ljava/lang/Object; u java/lang/String
t w x 6 equalsIgnoreCase
c z { | getEntity "()Lorg/bukkit/entity/LivingEntity; ~ org/bukkit/entity/LivingEntity getNearbyEntities (DDD)Ljava/util/List; o size ()I org/bukkit/entity/Entity g getType P @ java/lang/StringBuilder ecount:
J
append (I)Ljava/lang/StringBuilder;
m toString
java/lang/Math random ()D@$ calculating plague chance: Plague created "com/redfootdev/animalplague/Plague
F(Lorg/bukkit/plugin/java/JavaPlugin;Lorg/bukkit/entity/LivingEntity;)V v ,Lorg/bukkit/event/entity/CreatureSpawnEvent; i ecount stuff j k LocalVariableTypeTable ,Ljava/util/List;
StackMapTable
SourceFile AnimalPlague.java !
P * * * *
R* ** #' ) ** #/ ) ** #1 3 ** #7 9 =* ?C E* K O ** U " ! " # $ + % 8 ) A * Q + R [ 8
* ?\ E
0 1
^ _ ` a 5 /=>+ b h* = n t v + y* * * } : * Z6 H6 1 n h* = n t v * = DŽ * * K Y E* V k6* * K Y E #* * K E *+ y * = ڱ ^ 9 : ; ! ? ; A I C O E U G } H E C M N R S T U X Y Z \ 9. ` R / / , ;
L T R ? I ; &