Class PlayerEarnAchievementEvent
java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.player.PlayerEarnAchievementEvent
- All Implemented Interfaces:
Cancellable
Gets called when a player earns an achievement provided by MBedwars
It's possible that this event might get called async.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionPlayerEarnAchievementEvent
(Player player, PlayerAchievement achievement, PlayerAchievements achievementsData, boolean async) -
Method Summary
Modifier and TypeMethodDescriptionReturns the achievement that the player earned.static HandlerList
Returns the player who has won the achievement.Returns an object which contains his earn history.boolean
void
setCancelled
(boolean bool) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerEarnAchievementEvent
public PlayerEarnAchievementEvent(Player player, PlayerAchievement achievement, PlayerAchievements achievementsData, boolean async)
-
-
Method Details
-
getPlayer
Returns the player who has won the achievement.- Returns:
- The player involved in this event
-
getAchievement
Returns the achievement that the player earned.- Returns:
- The achievement
-
getPlayerAchievementsData
Returns an object which contains his earn history.- Returns:
- The achievements data of the player
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean bool) - Specified by:
setCancelled
in interfaceCancellable
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-