Chat colors

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
velocity
Member
Posts: 52
Joined: Sat May 10, 2014 6:17 pm

Chat colors

Postby velocity » Sun Feb 19, 2017 5:14 pm

Syntax: Select all

import colors
from messages import SayText

SayText('{}Hello'.format(colors.WHITE)).send()


Simple code and it works, but how do I avoid FFF000F in console?
User avatar
Kill
Member
Posts: 68
Joined: Wed Aug 31, 2016 10:05 pm

Re: Chat colors

Postby Kill » Sun Feb 19, 2017 6:45 pm

velocity wrote:

Syntax: Select all

import colors
from messages import SayText

SayText('{}Hello'.format(colors.WHITE)).send()


Simple code and it works, but how do I avoid FFF000F in console?



Try using sayText2.
User avatar
velocity
Member
Posts: 52
Joined: Sat May 10, 2014 6:17 pm

Re: Chat colors

Postby velocity » Sun Feb 19, 2017 7:03 pm

Not really a solution, by not writing anything in console at all
User avatar
Kill
Member
Posts: 68
Joined: Wed Aug 31, 2016 10:05 pm

Re: Chat colors

Postby Kill » Sun Feb 19, 2017 7:58 pm

velocity wrote:Not really a solution, by not writing anything in console at all


But does it write in chat in colors?
User avatar
velocity
Member
Posts: 52
Joined: Sat May 10, 2014 6:17 pm

Re: Chat colors

Postby velocity » Sun Feb 19, 2017 8:22 pm

Sure
User avatar
Ayuto
Project Leader
Posts: 1543
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Chat colors

Postby Ayuto » Mon Feb 20, 2017 6:47 pm

You can send the colored message using SayText2 and then send the uncolored message via core.echo_console().
User avatar
velocity
Member
Posts: 52
Joined: Sat May 10, 2014 6:17 pm

Re: Chat colors

Postby velocity » Mon Feb 20, 2017 11:06 pm

:(

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 2 guests