menu entry swapper: add bury swap

swaps the bury/use option
This commit is contained in:
Seth
2018-03-19 16:26:30 -05:00
parent 0fcb362f0e
commit e0c916c4b4
2 changed files with 15 additions and 0 deletions

View File

@@ -166,4 +166,15 @@ public interface MenuEntrySwapperConfig extends Config
{ {
return true; return true;
} }
@ConfigItem(
position = 12,
keyName = "swapBones",
name = "Bury",
description = "Swap Bury with Use on Bones"
)
default boolean swapBones()
{
return true;
}
} }

View File

@@ -132,6 +132,10 @@ public class MenuEntrySwapperPlugin extends Plugin
{ {
swap("teleport", option, target, true); swap("teleport", option, target, true);
} }
else if (config.swapBones() && option.equals("bury"))
{
swap("use", option, target, true);
}
} }
private int searchIndex(MenuEntry[] entries, String option, String target, boolean strict) private int searchIndex(MenuEntry[] entries, String option, String target, boolean strict)