Merge pull request #1018 from sethtroll/addburyswap

menu entry swapper: swaps bury to use
This commit is contained in:
Adam
2018-03-19 18:39:47 -04:00
committed by GitHub
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)