Skip to content

Commit

Permalink
PaperEvents - remove projectile collide event, it is already in Skript
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneBeee committed Oct 30, 2020
1 parent c42d9bb commit 49db819
Showing 1 changed file with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,30 +137,6 @@ public Location get(EntityZapEvent e) {
}, 0);
}

// Projectile Collide Event
if (Skript.classExists("com.destroystokyo.paper.event.entity.ProjectileCollideEvent")) {
Skript.registerEvent("Projectile Collide", SimpleEvent.class, ProjectileCollideEvent.class, "projectile collide")
.description("Called when a projectile collides with an entity" +
" (This event is called before entity damage event, and cancelling it will allow the projectile to continue flying)." +
"Requires Paper 1.11.2+")
.examples("on projectile collide:",
"\tif event-entity is a player:",
"\t\tcancel event")
.since("1.8.0");
EventValues.registerEventValue(ProjectileCollideEvent.class, Entity.class, new Getter<Entity, ProjectileCollideEvent>() {
@Override
public Entity get(ProjectileCollideEvent e) {
return e.getCollidedWith();
}
}, 0);
EventValues.registerEventValue(ProjectileCollideEvent.class, Projectile.class, new Getter<Projectile, ProjectileCollideEvent>() {
@Override
public Projectile get(ProjectileCollideEvent e) {
return e.getEntity();
}
}, 0);
}

// Entity Knockback Event
if (Skript.classExists("com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent")) {
Skript.registerEvent("Entity Knockback", SimpleEvent.class, EntityKnockbackByEntityEvent.class, "entity knockback")
Expand Down

0 comments on commit 49db819

Please sign in to comment.