-
Notifications
You must be signed in to change notification settings - Fork 8
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
1 parent
844bb40
commit 3f24794
Showing
2 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/Sergey_Dertan/SRegionProtector/Event/EmptyEvent.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,25 @@ | ||
package Sergey_Dertan.SRegionProtector.Event; | ||
|
||
import cn.nukkit.event.Event; | ||
import cn.nukkit.event.entity.EntitySpawnEvent; | ||
|
||
/** | ||
* special for | ||
* | ||
* @see RegionEventsHandler#entitySpawn(EntitySpawnEvent) | ||
* because EntitySpawnEvent can`t be cancelled | ||
*/ | ||
public final class EmptyEvent extends Event { | ||
|
||
private boolean isCancelled; | ||
|
||
@Override | ||
public void setCancelled() { | ||
this.isCancelled = true; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return this.isCancelled; | ||
} | ||
} |
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