mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-18 08:25:27 +01:00
fix alchemy xp permission issue Fixes #5131
This commit is contained in:
parent
90fe8ee882
commit
1db0aae46b
@ -1,4 +1,5 @@
|
|||||||
Version 2.2.030
|
Version 2.2.030
|
||||||
|
Fixed bug where Smelting permission was needed for Alchemy XP gain
|
||||||
Fixed material based salvage permissions not functioning (Thanks Momshroom)
|
Fixed material based salvage permissions not functioning (Thanks Momshroom)
|
||||||
|
|
||||||
Version 2.2.029
|
Version 2.2.029
|
||||||
|
@ -167,11 +167,15 @@ public class InventoryListener implements Listener {
|
|||||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
|
McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
if (event.getInventory() instanceof FurnaceInventory furnaceInventory) {
|
if (event.getInventory() instanceof FurnaceInventory furnaceInventory) {
|
||||||
|
if (!mcMMO.p.getSkillTools().doesPlayerHaveSkillPermission(player, PrimarySkillType.SMELTING))
|
||||||
|
return;
|
||||||
//Switch owners
|
//Switch owners
|
||||||
ContainerMetadataUtils.processContainerOwnership(furnaceInventory.getHolder(), player);
|
ContainerMetadataUtils.processContainerOwnership(furnaceInventory.getHolder(), player);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getInventory() instanceof BrewerInventory brewerInventory) {
|
if (event.getInventory() instanceof BrewerInventory brewerInventory) {
|
||||||
|
if (!mcMMO.p.getSkillTools().doesPlayerHaveSkillPermission(player, PrimarySkillType.ALCHEMY))
|
||||||
|
return;
|
||||||
// switch owners
|
// switch owners
|
||||||
ContainerMetadataUtils.processContainerOwnership(brewerInventory.getHolder(), player);
|
ContainerMetadataUtils.processContainerOwnership(brewerInventory.getHolder(), player);
|
||||||
}
|
}
|
||||||
|
@ -79,9 +79,6 @@ public class ContainerMetadataUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void processContainerOwnership(BlockState blockState, Player player) {
|
public static void processContainerOwnership(BlockState blockState, Player player) {
|
||||||
if (!mcMMO.p.getSkillTools().doesPlayerHaveSkillPermission(player, PrimarySkillType.SMELTING))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (getContainerOwner(blockState) != null) {
|
if (getContainerOwner(blockState) != null) {
|
||||||
if (getContainerOwner(blockState).getUniqueId().equals(player.getUniqueId()))
|
if (getContainerOwner(blockState).getUniqueId().equals(player.getUniqueId()))
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user