mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-01-22 21:41:23 +01:00
Play backpack sound only for player using the backpack
This commit is contained in:
parent
4df0ea78e9
commit
7a118e2385
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 GeorgH93
|
* Copyright (C) 2021 GeorgH93
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -67,7 +67,7 @@ public void onClose(InventoryCloseEvent event)
|
|||||||
}
|
}
|
||||||
if(closeSound != null)
|
if(closeSound != null)
|
||||||
{
|
{
|
||||||
closer.getWorld().playSound(closer.getLocation(), closeSound, 1, 0);
|
closer.playSound(closer.getLocation(), closeSound, 1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 GeorgH93
|
* Copyright (C) 2021 GeorgH93
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -327,7 +327,7 @@ public void openBackpack(@NotNull Player opener, @Nullable Backpack backpack, bo
|
|||||||
if(opener.getOpenInventory().getTopInventory().getHolder() == backpack) return; // == is fine as there is only one instance of each backpack
|
if(opener.getOpenInventory().getTopInventory().getHolder() == backpack) return; // == is fine as there is only one instance of each backpack
|
||||||
if(openSound != null)
|
if(openSound != null)
|
||||||
{
|
{
|
||||||
opener.getWorld().playSound(opener.getLocation(), openSound, 1, 0);
|
opener.playSound(opener.getLocation(), openSound, 1, 0);
|
||||||
}
|
}
|
||||||
backpack.open(opener, editable);
|
backpack.open(opener, editable);
|
||||||
}
|
}
|
||||||
|
2
pom.xml
2
pom.xml
@ -7,7 +7,7 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2.3.21.2</revision>
|
<revision>2.3.21.3</revision>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
Loading…
Reference in New Issue
Block a user