use of de.rubixdev.rug.gui.PlayerDataGui in project Rug by RubixDev.
the class PeekCommand method showInventory.
public static void showInventory(ServerPlayerEntity executingPlayer, ServerPlayerEntity targetPlayer) {
PlayerDataGui invScreen = new PlayerDataGui(ScreenHandlerType.GENERIC_9X5, executingPlayer, targetPlayer);
invScreen.setTitle(Text.of("Inventory of " + targetPlayer.getDisplayName().asString()));
for (int slot = 0; slot < executingPlayer.getInventory().size(); slot++) {
invScreen.setSlotRedirect(slot, new Slot(targetPlayer.getInventory(), slot, 0, 0));
}
invScreen.open();
}
use of de.rubixdev.rug.gui.PlayerDataGui in project Rug by RubixDev.
the class PeekCommand method showEnderChest.
public static void showEnderChest(ServerPlayerEntity executingPlayer, ServerPlayerEntity targetPlayer) {
EnderChestInventory targetEnderChest = targetPlayer.getEnderChestInventory();
PlayerDataGui invScreen = new PlayerDataGui(ScreenHandlerType.GENERIC_9X3, executingPlayer, targetPlayer);
invScreen.setTitle(Text.of("EnderChest of " + targetPlayer.getDisplayName().asString()));
for (int slot = 0; slot < targetEnderChest.size(); slot++) {
invScreen.setSlotRedirect(slot, new Slot(targetEnderChest, slot, 0, 0));
}
invScreen.open();
}
Aggregations