Skip to content

Commit

Permalink
Added Kill Effects
Browse files Browse the repository at this point in the history
  • Loading branch information
Devlrxxh committed Feb 5, 2024
1 parent 59954ac commit f8b724f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/main/java/me/funky/praxi/match/Match.java
Original file line number Diff line number Diff line change
Expand Up @@ -389,21 +389,18 @@ public void onDeath(Player dead) {
Player killer = PlayerUtil.getLastAttacker(dead);
if (killer != null) {
Profile killerProfile = Profile.getByUuid(killer.getUniqueId());

Location location = dead.getLocation();
World world = location.getWorld();
switch (killerProfile.getOptions().killEffect()) {
case LIGHTNING:
Location location = dead.getLocation();
double x = location.getX();
double y = location.getY() + 2.0;
double z = location.getZ();
World world = location.getWorld();
Location lightningLocation = new Location(world, x, y, z);
world.strikeLightning(lightningLocation);
break;
case FIREWORKS:
Location location2 = dead.getLocation();
World world2 = location2.getWorld();
Firework firework = world2.spawn(location2, Firework.class);
Firework firework = world.spawn(location, Firework.class);
FireworkMeta meta = firework.getFireworkMeta();
FireworkEffect.Builder builder = FireworkEffect.builder()
.withColor(Color.RED)
Expand Down

0 comments on commit f8b724f

Please sign in to comment.