Fix item delete in own inventory

Dragging items across top and bottom inventories with own inventory open resulted in the overlapping content being deleted.
This commit is contained in:
Jikoo
2021-03-16 23:49:10 -04:00
parent dad1e16c18
commit 1c9d133ed1
5 changed files with 233 additions and 68 deletions

View File

@@ -54,6 +54,18 @@ public interface IPlayerDataManager {
@Nullable
InventoryView openInventory(@NotNull Player player, @NotNull ISpecialInventory inventory);
/**
* Convert a raw slot number into a player inventory slot number.
*
* <p>Note that this method is specifically for converting an ISpecialPlayerInventory slot number into a regular
* player inventory slot number.
*
* @param view the open inventory view
* @param rawSlot the raw slot in the view
* @return the converted slot number
*/
int convertToPlayerSlot(InventoryView view, int rawSlot);
void sendSystemMessage(@NotNull Player player, @NotNull String message);
@NotNull