Skip to content

Commit

Permalink
Allow wind charges in claims
Browse files Browse the repository at this point in the history
  • Loading branch information
funnyboy-roks committed Jul 20, 2024
1 parent 17afb35 commit 076d6d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/kicas/rp/event/EntityEventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ else if (!flags.<TrustMeta>getFlagMeta(RegionFlag.TRUST).hasTrust((Player) event
*/
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onEntityExplosion(EntityExplodeEvent event) {
// Allow wind charges to explode -- potentially want a flag or something at some point in the future
if (event.getEntityType() == EntityType.WIND_CHARGE) {
return;
}

if (EntityType.TNT.equals(event.getEntityType())) {
// If the explosion occurs in a location where tnt is not allowed, cancel the event altogether
FlagContainer flags = RegionProtection.getDataManager().getFlagsAt(event.getLocation());
Expand Down

0 comments on commit 076d6d2

Please sign in to comment.