Added more API and features for Events

This commit is contained in:
Sn0wStorm
2019-11-13 22:07:22 +01:00
parent 48a15a0e82
commit 3332354846
29 changed files with 672 additions and 224 deletions
@@ -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;
}