From 839ccd4942416e5b4e47b4437cbd44b5a024dc39 Mon Sep 17 00:00:00 2001 From: Rosenthalk0 Date: Fri, 23 Jun 2023 13:39:28 -0500 Subject: [PATCH] Use MMOCore PlayerDataEvent --- .../mmocore/api/event/PlayerEnterCastingModeEvent.java | 8 ++++---- .../mmocore/api/event/PlayerExitCastingModeEvent.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/event/PlayerEnterCastingModeEvent.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/event/PlayerEnterCastingModeEvent.java index 7cefbaa9..3656a398 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/event/PlayerEnterCastingModeEvent.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/event/PlayerEnterCastingModeEvent.java @@ -1,19 +1,19 @@ package net.Indyuce.mmocore.api.event; import lombok.Getter; +import net.Indyuce.mmocore.api.player.PlayerData; 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; @Getter -public class PlayerEnterCastingModeEvent extends PlayerEvent implements Cancellable { - private static HandlerList handlerList = new HandlerList(); +public class PlayerEnterCastingModeEvent extends PlayerDataEvent implements Cancellable { + private static final HandlerList handlerList = new HandlerList(); private boolean cancelled = false; public PlayerEnterCastingModeEvent(@NotNull Player who) { - super(who); + super(PlayerData.get(who.getUniqueId())); } @Override diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/event/PlayerExitCastingModeEvent.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/event/PlayerExitCastingModeEvent.java index ce98c45c..4f065738 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/event/PlayerExitCastingModeEvent.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/event/PlayerExitCastingModeEvent.java @@ -1,19 +1,19 @@ package net.Indyuce.mmocore.api.event; import lombok.Getter; +import net.Indyuce.mmocore.api.player.PlayerData; 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; @Getter -public class PlayerExitCastingModeEvent extends PlayerEvent implements Cancellable { +public class PlayerExitCastingModeEvent extends PlayerDataEvent implements Cancellable { private static final HandlerList handlerList = new HandlerList(); private boolean cancelled = false; public PlayerExitCastingModeEvent(@NotNull Player who) { - super(who); + super(PlayerData.get(who.getUniqueId())); } @Override