world hopper: add option to disable Hop-to menu option
This commit is contained in:
@@ -102,11 +102,22 @@ public interface WorldHopperConfig extends Config
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "menuOption",
|
||||
name = "Show Hop-to menu option",
|
||||
description = "Adds Hop-to menu option to the friends list and clan members list",
|
||||
position = 6
|
||||
)
|
||||
default boolean menuOption()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "subscriptionFilter",
|
||||
name = "Show subscription types",
|
||||
description = "Only show free worlds, member worlds, or both types of worlds in sidebar",
|
||||
position = 6
|
||||
position = 7
|
||||
)
|
||||
default SubscriptionFilterMode subscriptionFilter()
|
||||
{
|
||||
|
||||
@@ -327,6 +327,11 @@ public class WorldHopperPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onMenuEntryAdded(MenuEntryAdded event)
|
||||
{
|
||||
if (!config.menuOption())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int groupId = WidgetInfo.TO_GROUP(event.getActionParam1());
|
||||
String option = event.getOption();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user