Skip to content

Commit 0052390

Browse files
committed
BloodDeathCosmetic追加
1 parent 40da3db commit 0052390

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/main/java/com/github/elic0de/thejpspit/cosmetics/CosmeticManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.github.elic0de.thejpspit.cosmetics;
22

3+
import com.github.elic0de.thejpspit.cosmetics.impl.death.BloodDeathCosmetic;
34
import com.github.elic0de.thejpspit.cosmetics.impl.death.CatCosmetic;
45
import com.github.elic0de.thejpspit.cosmetics.impl.kill.FireCosmetic;
56
import com.github.elic0de.thejpspit.cosmetics.type.DeathCosmetic;
@@ -22,6 +23,7 @@ public CosmeticManager() {
2223

2324
deathCosmetics = new ImmutableClassToInstanceMap.Builder<DeathCosmetic>()
2425
.put(CatCosmetic.class, new CatCosmetic())
26+
.put(BloodDeathCosmetic.class, new BloodDeathCosmetic())
2527
.build();
2628

2729
allCosmetics = new ImmutableClassToInstanceMap.Builder<AbstractCosmetic>()
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.github.elic0de.thejpspit.cosmetics.impl.death;
2+
3+
import com.github.elic0de.thejpspit.cosmetics.Cosmetic;
4+
import com.github.elic0de.thejpspit.cosmetics.CosmeticData;
5+
import com.github.elic0de.thejpspit.cosmetics.type.DeathCosmetic;
6+
import com.github.elic0de.thejpspit.player.PitPlayer;
7+
import org.bukkit.Material;
8+
import xyz.xenondevs.particle.ParticleBuilder;
9+
import xyz.xenondevs.particle.ParticleEffect;
10+
11+
@CosmeticData(id = "blooddeath", name = "床が赤でいっぱい", description = "ち", icon = Material.REDSTONE, coin = 50)
12+
public class BloodDeathCosmetic extends Cosmetic implements DeathCosmetic {
13+
14+
@Override
15+
public void onDeath(PitPlayer player) {
16+
if (canExecute(player)) {
17+
new ParticleBuilder(ParticleEffect.REDSTONE, player.getPlayer().getLocation())
18+
.setAmount(15)
19+
.setOffsetY(1f)
20+
.setSpeed(0.1f)
21+
.display(); }
22+
}
23+
}

0 commit comments

Comments
 (0)