Skip to content

Commit

Permalink
Rebase RegionEnterLeaveEvent to PlayerEvent instead of Event (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotSoDelayed authored Dec 18, 2023
1 parent 2c8aafc commit 895406e
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,25 @@
import com.sk89q.worldguard.session.MoveType;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.event.player.PlayerEvent;

public class RegionEnterLeaveEvent extends Event implements Cancellable {
public class RegionEnterLeaveEvent extends PlayerEvent implements Cancellable {

private final static HandlerList handlers = new HandlerList();
private boolean cancelled = false;

private final Player player;
private final WorldGuardRegion region;
private final MoveType moveType;
private final boolean enter;

public RegionEnterLeaveEvent(Player player, WorldGuardRegion region, MoveType moveType, boolean enter) {
this.player = player;
super(player);
this.region = region;
this.moveType = moveType;
this.enter = enter;
}

public Player getPlayer() {
return player;
}

public WorldGuardRegion getRegion() {
return region;
}
Expand Down

0 comments on commit 895406e

Please sign in to comment.