File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/main/java/com/github/elic0de/thejpspit/listener Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments