diff options
author | feildmaster <admin@feildmaster.com> | 2013-01-01 23:41:41 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-01-01 23:44:18 -0600 |
commit | 87e41b0d13fcaece914c58a9e3321403b5db9290 (patch) | |
tree | 6f9f119178a4beba86b1ca25cfc7aa07b4ef475f /src | |
parent | bd9d845c6d74fe1de16b376512bc3d5fce497196 (diff) | |
download | bukkit-87e41b0d13fcaece914c58a9e3321403b5db9290.tar bukkit-87e41b0d13fcaece914c58a9e3321403b5db9290.tar.gz bukkit-87e41b0d13fcaece914c58a9e3321403b5db9290.tar.lz bukkit-87e41b0d13fcaece914c58a9e3321403b5db9290.tar.xz bukkit-87e41b0d13fcaece914c58a9e3321403b5db9290.zip |
Add experience methods for PlayerFishEvent. Adds BUKKIT-3348
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/event/player/PlayerFishEvent.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/player/PlayerFishEvent.java b/src/main/java/org/bukkit/event/player/PlayerFishEvent.java index cdc5ebf0..a41c62b2 100644 --- a/src/main/java/org/bukkit/event/player/PlayerFishEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerFishEvent.java @@ -12,6 +12,7 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private final Entity entity; private boolean cancel = false; + private int exp; private final State state; public PlayerFishEvent(final Player player, final Entity entity, final State state) { @@ -38,6 +39,28 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable { } /** + * Gets the amount of experience received when fishing. + * <p /> + * Note: This value has no default effect unless the event state is {@link State#CAUGHT_FISH}. + * + * @return the amount of experience to drop + */ + public int getExpToDrop() { + return exp; + } + + /** + * Sets the amount of experience received when fishing. + * <p /> + * Note: This value has no default effect unless the event state is {@link State#CAUGHT_FISH}. + * + * @param amount the amount of experience to drop + */ + public void setExpToDrop(int amount) { + exp = amount; + } + + /** * Gets the state of the fishing * * @return A State detailing the state of the fishing |