Make regular item pickup sound global.
This commit is contained in:
parent
8f9f537389
commit
640ea50149
@ -3838,7 +3838,7 @@ public class GenericFunctions {
|
|||||||
public static boolean giveItem(Player p, ItemStack... items) {
|
public static boolean giveItem(Player p, ItemStack... items) {
|
||||||
HashMap<Integer,ItemStack> remaining = p.getInventory().addItem(items);
|
HashMap<Integer,ItemStack> remaining = p.getInventory().addItem(items);
|
||||||
if (remaining.isEmpty()) {
|
if (remaining.isEmpty()) {
|
||||||
SoundUtils.playLocalSound(p, Sound.ENTITY_ITEM_PICKUP, 1.0f, 1.0f);
|
SoundUtils.playGlobalSound(p.getLocation(), Sound.ENTITY_ITEM_PICKUP, 1.0f, 1.0f);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
for (Integer i : remaining.keySet()) {
|
for (Integer i : remaining.keySet()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user