Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.wardensmp.plugins.dev.npc;
- import net.minecraft.server.v1_16_R3.EntityPlayer;
- import org.bukkit.entity.Player;
- import org.bukkit.event.Cancellable;
- import org.bukkit.event.Event;
- import org.bukkit.event.HandlerList;
- import org.jetbrains.annotations.NotNull;
- public class RightClickNPC extends Event implements Cancellable {
- private static final HandlerList HANDLERS = new HandlerList();
- private final Player player;
- private final EntityPlayer npc;
- private boolean isCancelled;
- public RightClickNPC(Player player, EntityPlayer npc) {
- this.player = player;
- this.npc = npc;
- }
- public Player getPlayer() {
- return player;
- }
- public EntityPlayer getNPC() {
- return npc;
- }
- @NotNull
- @Override
- public HandlerList getHandlers() {
- return HANDLERS;
- }
- public HandlerList getHandlerList() {
- return HANDLERS;
- }
- @Override
- public boolean isCancelled() {
- return isCancelled;
- }
- @Override
- public void setCancelled(boolean arg) {
- this.isCancelled = arg;
- }
- }
Add Comment
Please, Sign In to add comment