GetData Fixes, Added DataUpdater

This commit is contained in:
Sn0wStorm
2014-06-03 21:03:32 +02:00
parent ba87aaabcf
commit f69d55ebb5
8 changed files with 215 additions and 45 deletions
@@ -32,6 +32,9 @@ public class LogBlockBarrel {
}
private void compareInv(final ItemStack[] after) {
if (consumer == null) {
return;
}
final ItemStack[] diff = compareInventories(items, after);
for (final ItemStack item : diff) {
consumer.queueChestAccess(player.getName(), loc, loc.getWorld().getBlockTypeIdAt(loc), (short) item.getTypeId(), (short) item.getAmount(), rawData(item));
@@ -62,6 +65,9 @@ public class LogBlockBarrel {
}
public static void breakBarrel(String playerName, ItemStack[] contents, Location spigotLoc) {
if (consumer == null) {
return;
}
if (!isLogging(spigotLoc.getWorld(), Logging.CHESTACCESS)) return;
final ItemStack[] items = compressInventory(contents);
for (final ItemStack item : items) {