-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from ToberoCat/projectile-protection
Added projectile protection
- Loading branch information
Showing
4 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...in/kotlin/io/github/toberocat/improvedfactions/listeners/claim/ClaimProjectileListener.kt
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,15 @@ | ||
package io.github.toberocat.improvedfactions.listeners.claim | ||
|
||
import org.bukkit.entity.Player | ||
import org.bukkit.event.EventHandler | ||
import org.bukkit.event.entity.ProjectileHitEvent | ||
|
||
class ClaimProjectileListener(zoneType: String) : ProtectionListener(zoneType) { | ||
override fun namespace() = "projectiles" | ||
|
||
@EventHandler | ||
fun onProjectileHit(event: ProjectileHitEvent) { | ||
val player = event.entity.shooter as? Player ?: return | ||
protectChunk(event, event.entity, player) | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#Thu Dec 05 21:04:31 CET 2024 | ||
buildIncrement=29 | ||
#Thu Dec 05 21:10:14 CET 2024 | ||
buildIncrement=30 | ||
versionName=2.3.0 |