Core icon indicating copy to clipboard operation
Core copied to clipboard

Formatting codes do not work

Open Masy opened this issue 10 years ago • 17 comments

Color codes work fine but the formatting codes don't work. -> http://minecraft.gamepedia.com/Formatting_codes

Masy avatar Aug 11 '14 12:08 Masy

Looks like a bug in the server not core. Possibly related to mc-server/MCServer#852

worktycho avatar Aug 11 '14 12:08 worktycho

The server itself uses the at-sign (@) for color-codes, which is kinda stupid because that's a rather common character. People have been saying they want it changed to the and-sign (&), but that conflicts with most parameterized URLs.

madmaxoft avatar Aug 11 '14 12:08 madmaxoft

Which issue is that, because I'd like to suggest we use \a.

worktycho avatar Aug 11 '14 12:08 worktycho

A backslash for formatting codes? That's new. It'd be somewhat nerve-wrecking in code - it has to be escaped, which is often forgotten. But otherwise that could work. The only thing I can think of using backslashes is Windows path separator.

madmaxoft avatar Aug 11 '14 12:08 madmaxoft

No as in the bell character. Or any of the other effectively obsolete ASCII charicters: Start Of Heading, Start Of Text, End Of Text, End Of Transmission, Enquiry, Acknowledge, backspace, Vertical Tab, Form Feed, ... Theres loads of characters below char 32 which aren't used any more.

worktycho avatar Aug 11 '14 12:08 worktycho

But those can't be typed on a keyboard.

madmaxoft avatar Aug 11 '14 12:08 madmaxoft

But if they're only used internally then we can just use the escape sequences. For anything exposed we should use the same as the client.

worktycho avatar Aug 11 '14 12:08 worktycho

The point is that they're exposed.

madmaxoft avatar Aug 11 '14 13:08 madmaxoft

Then why aren't we using the same char as vanilla, any character that is on a keyboard will have the same problem as @?

worktycho avatar Aug 11 '14 13:08 worktycho

Well Bukkit normally uses &, but I don't think I've ever used my ¬ character.

bearbin avatar Aug 11 '14 14:08 bearbin

I'm pretty sure I have, I don't think there a single key on my key board I haven't used at least once.

worktycho avatar Aug 11 '14 15:08 worktycho

I don't have that character on my keyboard though.

NiLSPACE avatar Aug 11 '14 15:08 NiLSPACE

me either, i think & or @ are the best solutions...

Masy avatar Aug 11 '14 15:08 Masy

I'd say go with & then, because it's what bukkit stuff uses.

But make sure to add && as an escape, and only convert it to a colour code when it's followed by one of the right nums/letters.

bearbin avatar Aug 11 '14 15:08 bearbin

Also you shouldn't be scared of broken links, the colores are just visual, minecraft converts it into colors so links still work...

Masy avatar Aug 11 '14 15:08 Masy

The bell character is used. Command Prompt ~~screams~~ beeps at you if you feed it a bell.

tigerw avatar Aug 11 '14 20:08 tigerw

@tigerw When was the last time you used a bell in a piece of text? My comment still stands about the others

worktycho avatar Aug 11 '14 21:08 worktycho