world hopper: allow disabling chat hop message
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -616,20 +616,23 @@ public class WorldHopperPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String chatMessage = new ChatMessageBuilder()
|
if (config.showWorldHopMessage())
|
||||||
.append(ChatColorType.NORMAL)
|
{
|
||||||
.append("Quick-hopping to World ")
|
String chatMessage = new ChatMessageBuilder()
|
||||||
.append(ChatColorType.HIGHLIGHT)
|
.append(ChatColorType.NORMAL)
|
||||||
.append(Integer.toString(world.getId()))
|
.append("Quick-hopping to World ")
|
||||||
.append(ChatColorType.NORMAL)
|
.append(ChatColorType.HIGHLIGHT)
|
||||||
.append("..")
|
.append(Integer.toString(world.getId()))
|
||||||
.build();
|
.append(ChatColorType.NORMAL)
|
||||||
|
.append("..")
|
||||||
|
.build();
|
||||||
|
|
||||||
chatMessageManager
|
chatMessageManager
|
||||||
.queue(QueuedMessage.builder()
|
.queue(QueuedMessage.builder()
|
||||||
.type(ChatMessageType.GAME)
|
.type(ChatMessageType.GAME)
|
||||||
.runeLiteFormattedMessage(chatMessage)
|
.runeLiteFormattedMessage(chatMessage)
|
||||||
.build());
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
quickHopTargetWorld = rsWorld;
|
quickHopTargetWorld = rsWorld;
|
||||||
displaySwitcherAttempts = 0;
|
displaySwitcherAttempts = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user