diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperConfig.java index db1f50d599..ec876d916e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperConfig.java @@ -124,12 +124,23 @@ default boolean removePVPWorld() { return false; } + + @ConfigItem( + keyName = "removeBHWorld", + name = "Remove Hop-to menu option (BH)", + description = "Removes Hop-to menu option for Bounty Hunter worlds", + position = 8 + ) + default boolean removeBHWorld() + { + return false; + } @ConfigItem( keyName = "subscriptionFilter", name = "Show subscription types", description = "Only show free worlds, member worlds, or both types of worlds in sidebar", - position = 8 + position = 9 ) default SubscriptionFilterMode subscriptionFilter() { @@ -140,7 +151,7 @@ default SubscriptionFilterMode subscriptionFilter() keyName = "displayPing", name = "Display current ping", description = "Displays ping to current game world", - position = 9 + position = 10 ) default boolean displayPing() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java index da300820ac..1762b34107 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldHopperPlugin.java @@ -163,6 +163,7 @@ public class WorldHopperPlugin extends Plugin private SubscriptionFilterMode subscriptionFilter; private boolean menuOption; private boolean removePVPWorld; + private boolean removeBHWorld; @Getter(AccessLevel.PACKAGE) private boolean displayPing; @@ -395,9 +396,10 @@ else if (BEFORE_OPTIONS.contains(option)) World currentWorld = worldResult.findWorld(client.getWorld()); World targetWorld = worldResult.findWorld(player.getWorld()); if ((targetWorld == null || currentWorld == null) - || (this.removePVPWorld && !currentWorld.getTypes().contains(WorldType.PVP) && targetWorld.getTypes().contains(WorldType.PVP))) + || (this.removePVPWorld && !currentWorld.getTypes().contains(WorldType.PVP) && targetWorld.getTypes().contains(WorldType.PVP)) + || (this.removeBHWorld &&!currentWorld.getTypes().contains(WorldType.BOUNTY) && targetWorld.getTypes().contains(WorldType.BOUNTY))) { - // Disable Hop-to a PVP world from a regular world + // Disable Hop-to a PVP world & BH world from a regular world return; } @@ -528,9 +530,9 @@ private void hop(boolean previous) { currentWorldTypes.remove(WorldType.PVP); currentWorldTypes.remove(WorldType.HIGH_RISK); + currentWorldTypes.remove(WorldType.BOUNTY); } // Don't regard these worlds as a type that must be hopped between - currentWorldTypes.remove(WorldType.BOUNTY); currentWorldTypes.remove(WorldType.SKILL_TOTAL); currentWorldTypes.remove(WorldType.LAST_MAN_STANDING); @@ -795,6 +797,7 @@ private void updateConfig() this.displayPing = config.displayPing(); this.menuOption = config.menuOption(); this.removePVPWorld = config.removePVPWorld(); + this.removeBHWorld = config.removeBHWorld(); } /**