Skip to content

Commit

Permalink
Merge pull request #381 from Oribuin/master
Browse files Browse the repository at this point in the history
Give Puke metadata.
  • Loading branch information
Sn0wStorm authored Jun 15, 2021
2 parents d4af104 + 54a371c commit 1508796
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/com/dre/brewery/BPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;
Expand Down Expand Up @@ -614,6 +615,7 @@ public static void puke(Player player) {
Item item = player.getWorld().dropItem(loc, new ItemStack(BConfig.pukeItem));
item.setVelocity(direction);
item.setPickupDelay(32767); // Item can never be picked up when pickup delay is 32767
item.setMetadata("brewery_puke", new FixedMetadataValue(P.getInstance(), true));
if (P.use1_14) item.setPersistent(false); // No need to save Puke items

int pukeDespawntime = BConfig.pukeDespawntime;
Expand Down

0 comments on commit 1508796

Please sign in to comment.