-
Notifications
You must be signed in to change notification settings - Fork 33
Supplying UUIDs
Jan edited this page Apr 9, 2023
·
1 revision
So far we've looked at Api methods that can create or open the spectator inventory given the username of the target player. But there are other methods as well:
If you know the unique id (UUID) of the target in addition to the username, then you can use the following methods:
InvseeAPI#mainSpectatorInventory(UUID playerId, String playerName)InvseeAPI#mainSpectatorInventory(UUID playerId, String playerName, CreationOptions<PlayerInventorySlot> creationOptions)InvseeAPI#spectateInventory(Player spectator, UUID targetId, String targetName, CreationOptions<PlayerInventorySlot> creationOptions)InvseeAPI#enderSpectatorInventory(UUID playerId, String playerName)InvseeAPI#enderSpectatorInventory(UUID playerId, String playerName, CreationOptions<EnderChestSlot> creationOptions)InvseeAPI#spectateEnderChest(Player spectator, UUID targetId, String targetName, CreationOptions<EnderChestSlot> creationOptions)
These methods save InvSee++ from having to do UUID lookups, so it is recommended to use these methods where possible.