mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 10:08:54 +00:00
Added more API and features for Events
This commit is contained in:
@@ -5,8 +5,9 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/*
|
||||
/**
|
||||
* The player pukes (throws puke items to the ground)
|
||||
* Those items can never be picked up and despawn after the time set in the config
|
||||
* Number of items to drop can be changed with count
|
||||
@@ -23,10 +24,16 @@ public class PlayerPukeEvent extends PlayerEvent implements Cancellable {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The Amount of items being dropped this time
|
||||
*/
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param count Set the amount of items being dropped this time
|
||||
*/
|
||||
public void setCount(int count) {
|
||||
this.count = count;
|
||||
}
|
||||
@@ -48,11 +55,13 @@ public class PlayerPukeEvent extends PlayerEvent implements Cancellable {
|
||||
this.cancelled = cancelled;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
// Required by Bukkit
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user