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;
|
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(
|
@ConfigItem(
|
||||||
keyName = "subscriptionFilter",
|
keyName = "subscriptionFilter",
|
||||||
name = "Show subscription types",
|
name = "Show subscription types",
|
||||||
description = "Only show free worlds, member worlds, or both types of worlds in sidebar",
|
description = "Only show free worlds, member worlds, or both types of worlds in sidebar",
|
||||||
position = 6
|
position = 7
|
||||||
)
|
)
|
||||||
default SubscriptionFilterMode subscriptionFilter()
|
default SubscriptionFilterMode subscriptionFilter()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -327,6 +327,11 @@ public class WorldHopperPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onMenuEntryAdded(MenuEntryAdded event)
|
public void onMenuEntryAdded(MenuEntryAdded event)
|
||||||
{
|
{
|
||||||
|
if (!config.menuOption())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int groupId = WidgetInfo.TO_GROUP(event.getActionParam1());
|
int groupId = WidgetInfo.TO_GROUP(event.getActionParam1());
|
||||||
String option = event.getOption();
|
String option = event.getOption();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user