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:
@@ -127,7 +127,6 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
MenuAction.ITEM_THIRD_OPTION,
|
MenuAction.ITEM_THIRD_OPTION,
|
||||||
MenuAction.ITEM_FOURTH_OPTION,
|
MenuAction.ITEM_FOURTH_OPTION,
|
||||||
MenuAction.ITEM_FIFTH_OPTION,
|
MenuAction.ITEM_FIFTH_OPTION,
|
||||||
MenuAction.EXAMINE_ITEM,
|
|
||||||
MenuAction.ITEM_USE
|
MenuAction.ITEM_USE
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -781,7 +780,7 @@ public class MenuEntrySwapperPlugin extends Plugin
|
|||||||
ItemComposition itemComposition = event.getItemComposition();
|
ItemComposition itemComposition = event.getItemComposition();
|
||||||
Integer option = getSwapConfig(true, itemComposition.getId());
|
Integer option = getSwapConfig(true, itemComposition.getId());
|
||||||
|
|
||||||
if (option != null)
|
if (option != null && option < itemComposition.getInventoryActions().length)
|
||||||
{
|
{
|
||||||
itemComposition.setShiftClickActionIndex(option);
|
itemComposition.setShiftClickActionIndex(option);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user