Permalink
Browse files

Added interface for setting and getting a pig zombie's anger level.

  • Loading branch information...
1 parent 8da7426 commit 7968683662534294d1a260b0c61e144f05c504bf @CelticMinstrel CelticMinstrel committed with EvilSeph Jul 14, 2011
Showing with 29 additions and 7 deletions.
  1. +29 −7 src/main/java/org/bukkit/entity/PigZombie.java
@@ -1,12 +1,34 @@
-/**
- *
- */
package org.bukkit.entity;
/**
* Represents a Pig Zombie.
- *
- * @author Cogito
- *
*/
-public interface PigZombie extends Zombie {}
+public interface PigZombie extends Zombie {
+ /**
+ * Get the pig zombie's current anger level.
+ *
+ * @return The anger level.
+ */
+ int getAnger();
+
+ /**
+ * Set the pig zombie's current anger level.
+ *
+ * @param level The anger level. Higher levels of anger take longer to wear off.
+ */
+ void setAnger(int level);
+
+ /**
+ * Shorthand; sets to either 0 or the default level.
+ *
+ * @param angry Whether the zombie should be angry.
+ */
+ void setAngry(boolean angry);
+
+ /**
+ * Shorthand; gets whether the zombie is angry.
+ *
+ * @return True if the zombie is angry, otherwise false.
+ */
+ boolean isAngry();
+}

0 comments on commit 7968683

Please sign in to comment.