added files.

This commit is contained in:
nitrogenoliquido committed 2026-11-01 21:26:40 -05:00
commit db0d8ce913
2186 files changed
+238581

No files matched your search

@@ -0,0 +1,40 @@
package it.ytnoos.lpx.adapter;
import it.ytnoos.lpx.api.adapter.InventoryViewAdapter;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryView;
public class LegacyInventoryViewAdapter implements InventoryViewAdapter {
private final InventoryView inventoryView;
public LegacyInventoryViewAdapter(Player player) {
this.inventoryView = player.getOpenInventory();
}
public boolean isNull() {
return this.inventoryView == null;
}
public String getType() {
return this.inventoryView.getType().name();
}
public Inventory getTopInventory() {
return this.inventoryView.getTopInventory();
}
public Inventory getBottomInventory() {
return this.inventoryView.getBottomInventory();
}
public int countSlots() {
return this.inventoryView.countSlots();
}
public int convertSlot(int value) {
return this.inventoryView.convertSlot(value);
}
}