mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
Add experience methods for PlayerFishEvent. Adds BUKKIT-3348
By: feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
c87a38be5f
commit
df5229b286
@ -12,6 +12,7 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
|
|||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
private final Entity entity;
|
private final Entity entity;
|
||||||
private boolean cancel = false;
|
private boolean cancel = false;
|
||||||
|
private int exp;
|
||||||
private final State state;
|
private final State state;
|
||||||
|
|
||||||
public PlayerFishEvent(final Player player, final Entity entity, final State state) {
|
public PlayerFishEvent(final Player player, final Entity entity, final State state) {
|
||||||
@ -37,6 +38,28 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
|
|||||||
this.cancel = cancel;
|
this.cancel = cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Gets the state of the fishing
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user