public void openInventory(InventoryView view) {
session.send(new CloseWindowMessage(invMonitor.getId()));
super.openInventory(view);
invMonitor = new InventoryMonitor(getOpenInventory());
int viewId = invMonitor.getId();
if (viewId != 0) {
String title = view.getTitle();
boolean defaultTitle = view.getType().getDefaultTitle().equals(title);
if (view.getTopInventory() instanceof PlayerInventory && defaultTitle) {