Skip to content

Commit 44ebf24

Browse files
committed
一時的にbloodを使えるように
1 parent 6603d7a commit 44ebf24

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/main/java/com/github/elic0de/thejpspit/cosmetics/impl/death/BloodDeathCosmetic.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.github.elic0de.thejpspit.cosmetics.CosmeticData;
55
import com.github.elic0de.thejpspit.cosmetics.type.DeathCosmetic;
66
import com.github.elic0de.thejpspit.player.PitPlayer;
7+
import org.bukkit.Effect;
78
import org.bukkit.Material;
89
import xyz.xenondevs.particle.ParticleBuilder;
910
import xyz.xenondevs.particle.ParticleEffect;
@@ -14,10 +15,8 @@ public class BloodDeathCosmetic extends Cosmetic implements DeathCosmetic {
1415
@Override
1516
public void onDeath(PitPlayer player) {
1617
if (canExecute(player)) {
17-
new ParticleBuilder(ParticleEffect.REDSTONE, player.getPlayer().getLocation())
18-
.setAmount(15)
19-
.setOffsetY(1f)
20-
.setSpeed(0.1f)
21-
.display(); }
18+
player.getPlayer().playEffect(player.getPlayer().getLocation().clone().add(0, 0.5, 0), Effect.STEP_SOUND, 152);
19+
player.getPlayer().playEffect(player.getPlayer().getLocation().clone().add(0, 1, 0), Effect.STEP_SOUND, 152);
20+
}
2221
}
2322
}

src/main/java/com/github/elic0de/thejpspit/cosmetics/impl/kill/BloodKillCosmetic.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,17 @@
44
import com.github.elic0de.thejpspit.cosmetics.CosmeticData;
55
import com.github.elic0de.thejpspit.cosmetics.type.KillCosmetic;
66
import com.github.elic0de.thejpspit.player.PitPlayer;
7+
import org.bukkit.Effect;
78
import org.bukkit.Material;
8-
import xyz.xenondevs.particle.ParticleBuilder;
9-
import xyz.xenondevs.particle.ParticleEffect;
109

1110
@CosmeticData(id = "bloodkill", name = "あか", description = "あかかかかk", icon = Material.RED_DYE, coin = 50)
1211
public class BloodKillCosmetic extends Cosmetic implements KillCosmetic {
1312

1413
@Override
1514
public void onKill(PitPlayer player, PitPlayer target) {
1615
if (canExecute(player)) {
17-
new ParticleBuilder(ParticleEffect.REDSTONE, target.getPlayer().getLocation())
18-
.setAmount(15)
19-
.setOffsetY(1f)
20-
.setSpeed(0.1f)
21-
.display();
16+
player.getPlayer().playEffect(player.getPlayer().getLocation().clone().add(0, 0.5, 0), Effect.STEP_SOUND, 152);
17+
player.getPlayer().playEffect(player.getPlayer().getLocation().clone().add(0, 1, 0), Effect.STEP_SOUND, 152);
2218
}
2319
}
2420
}

0 commit comments

Comments
 (0)