mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancydialogs: Add DialogButtonClickedEvent
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
package com.fancyinnovations.fancydialogs.api.events;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class DialogButtonClickedEvent extends Event {
|
||||
|
||||
private static final HandlerList handlerList = new HandlerList();
|
||||
|
||||
private final Player player;
|
||||
private final String dialogId;
|
||||
private final String buttonId;
|
||||
|
||||
public DialogButtonClickedEvent(@NotNull Player player, @NotNull String dialogId, @NotNull String buttonId) {
|
||||
super(!Bukkit.isPrimaryThread());
|
||||
this.player = player;
|
||||
this.dialogId = dialogId;
|
||||
this.buttonId = buttonId;
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
public String getDialogId() {
|
||||
return dialogId;
|
||||
}
|
||||
|
||||
public String getButtonId() {
|
||||
return buttonId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull HandlerList getHandlers() {
|
||||
return handlerList;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user