world hopper: allow disabling chat hop message

This commit is contained in:
Jeremy Plsek
2019-01-20 14:57:29 -05:00
parent b4de93d722
commit 6a9e9288d9
2 changed files with 27 additions and 13 deletions

View File

@@ -90,4 +90,15 @@ public interface WorldHopperConfig extends Config
{ {
return true; return true;
} }
@ConfigItem(
keyName = "showMessage",
name = "Show world hop message in chat",
description = "Shows what world is being hopped to in the chat",
position = 5
)
default boolean showWorldHopMessage()
{
return true;
}
} }

View File

@@ -616,6 +616,8 @@ public class WorldHopperPlugin extends Plugin
return; return;
} }
if (config.showWorldHopMessage())
{
String chatMessage = new ChatMessageBuilder() String chatMessage = new ChatMessageBuilder()
.append(ChatColorType.NORMAL) .append(ChatColorType.NORMAL)
.append("Quick-hopping to World ") .append("Quick-hopping to World ")
@@ -630,6 +632,7 @@ public class WorldHopperPlugin extends Plugin
.type(ChatMessageType.GAME) .type(ChatMessageType.GAME)
.runeLiteFormattedMessage(chatMessage) .runeLiteFormattedMessage(chatMessage)
.build()); .build());
}
quickHopTargetWorld = rsWorld; quickHopTargetWorld = rsWorld;
displaySwitcherAttempts = 0; displaySwitcherAttempts = 0;