-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alex2276564
committed
Oct 30, 2024
1 parent
a9f54ba
commit 94c6327
Showing
2 changed files
with
56 additions
and
8 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/main/java/uz/alex2276564/leverlock/events/PlayerInteractWithLeverEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package uz.alex2276564.leverlock.events; | ||
|
||
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; | ||
|
||
public class PlayerInteractWithLeverEvent extends PlayerEvent implements Cancellable { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
|
||
private boolean cancel = false; | ||
|
||
public PlayerInteractWithLeverEvent(@NotNull Player player) { | ||
super(player); | ||
} | ||
|
||
@Override | ||
public @NotNull HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancel; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancel) { | ||
this.cancel = cancel; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters