Skip to content

Commit 65b3ab1

Browse files
committed
金リンゴのみ再生と耐性が付与するように
1 parent 25793e7 commit 65b3ab1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/com/github/elic0de/thejpspit/listener/EventListener.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ public void onQuit(PlayerQuitEvent event) {
9191
public void onConsume(PlayerItemConsumeEvent event) {
9292
final Player player = event.getPlayer();
9393

94-
if (event.getItem().getType() == Material.GOLD_BLOCK)
95-
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 5 * 20, 2));
96-
player.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 20 * 60 * 2, 0));
94+
if (event.getItem().getType() == Material.GOLDEN_APPLE) {
95+
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 5 * 20, 2));
96+
player.addPotionEffect(new PotionEffect(PotionEffectType.ABSORPTION, 20 * 60 * 2, 0));
97+
}
9798
}
9899

99100

0 commit comments

Comments
 (0)