Use MMOCore PlayerDataEvent

This commit is contained in:
Rosenthalk0 2023-06-23 13:39:28 -05:00
parent 6088c8b343
commit 839ccd4942
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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