-
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
085cea0
commit 7ddc388
Showing
2 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...in/java/uz/alex2276564/iafurniturebreakrestricter/events/PlayerIAFurnitureBreakEvent.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.iafurniturebreakrestricter.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 PlayerIAFurnitureBreakEvent extends PlayerEvent implements Cancellable { | ||
|
||
private static final HandlerList handlers = new HandlerList(); | ||
|
||
private boolean cancel = false; | ||
|
||
public PlayerIAFurnitureBreakEvent(@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; | ||
} | ||
} |
19 changes: 17 additions & 2 deletions
19
...in/java/uz/alex2276564/iafurniturebreakrestricter/listeners/IAFurnitureBreakListener.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