Tested integrations

This commit is contained in:
Sn0wStorm 2018-10-30 17:34:52 +01:00
parent 9bb5936d0d
commit 6da8bbcb48
2 changed files with 7 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public class GriefPreventionBarrel {
playerData.lastClaim = claim; playerData.lastClaim = claim;
String noContainersReason = claim.allowContainers(player); String noContainersReason = claim.allowContainers(player);
if (noContainersReason != null) { if (noContainersReason != null) {
brewery.msg(player, brewery.languageReader.get("Error_NoBarrelAccess")); brewery.msg(player, brewery.languageReader.get("Error_NoBarrelAccess") + " " + noContainersReason);
return false; return false;
} }
} }

View File

@ -69,7 +69,12 @@ public class LogBlockBarrel {
e.printStackTrace(); e.printStackTrace();
} }
} else { } else {
consumer.queueChestAccess(Actor.actorFromEntity(player), loc, loc.getBlock().getBlockData(), item, false); ItemStack i2 = item;
if (item.getAmount() < 0) {
i2 = item.clone();
i2.setAmount(Math.abs(item.getAmount()));
}
consumer.queueChestAccess(Actor.actorFromEntity(player), loc, loc.getBlock().getBlockData(), i2, item.getAmount() < 0);
} }
} }
} }