Add chat message recolouring API
- Update api of SendMessage to also include message type - Create API for updating chat message based on saved colors for normal and highlighted message and for adding game messages that can be recolored too - Update chat commands plugin to use the new API - Add option to globally disable recoloring to RuneliteConfig Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.GameState;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.events.GameStateChanged;
|
||||
import net.runelite.client.plugins.Plugin;
|
||||
@@ -49,7 +50,7 @@ public class ExamplePlugin extends Plugin
|
||||
{
|
||||
if (gameStateChanged.getGameState() == GameState.LOGGED_IN)
|
||||
{
|
||||
client.sendGameMessage("Example plugin is running!");
|
||||
client.sendGameMessage(ChatMessageType.GAME, "Example plugin is running!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,4 +72,4 @@ public class ExamplePlugin extends Plugin
|
||||
return configManager.getConfig(ExamplePluginConfiguration.class);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user