menu swapper: remove examine swap

This has not worked in the past, since the Examine option is not an inventory
action and so cannot ever be shift-click swapped, and causes a crash now if
set due to it subtracting the Examine menu op from ITEM_FIRST_OPTION.
This commit is contained in:
Adam
2022-01-03 13:57:56 -05:00
parent 97c484fc38
commit a2f8a4219e

View File

@@ -127,7 +127,6 @@ public class MenuEntrySwapperPlugin extends Plugin
MenuAction.ITEM_THIRD_OPTION,
MenuAction.ITEM_FOURTH_OPTION,
MenuAction.ITEM_FIFTH_OPTION,
MenuAction.EXAMINE_ITEM,
MenuAction.ITEM_USE
);
@@ -781,7 +780,7 @@ public class MenuEntrySwapperPlugin extends Plugin
ItemComposition itemComposition = event.getItemComposition();
Integer option = getSwapConfig(true, itemComposition.getId());
if (option != null)
if (option != null && option < itemComposition.getInventoryActions().length)
{
itemComposition.setShiftClickActionIndex(option);
}