org.bukkit.event.player.PlayerAchievementAwardedEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chest-server Show documentation
Show all versions of chest-server Show documentation
A spigot fork to kotlin structure and news.
The newest version!
package org.bukkit.event.player;
import org.bukkit.Achievement;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
/**
* Called when a player earns an achievement.
*/
public class PlayerAchievementAwardedEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final Achievement achievement;
private boolean isCancelled = false;
public PlayerAchievementAwardedEvent(Player player, Achievement achievement) {
super(player);
this.achievement = achievement;
}
public static HandlerList getHandlerList() {
return handlers;
}
/**
* Gets the Achievement being awarded.
*
* @return the achievement being awarded
*/
public Achievement getAchievement() {
return achievement;
}
public boolean isCancelled() {
return isCancelled;
}
public void setCancelled(boolean cancel) {
this.isCancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy