cuberite / Core

Plugin for Cuberite that implements default commands and some additional functionality
Other
64 stars 41 forks source link

Formatting codes do not work #84

Open Masy opened 10 years ago

Masy commented 10 years ago

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

worktycho commented 10 years ago

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

madmaxoft commented 10 years ago

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.

worktycho commented 10 years ago

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

madmaxoft commented 10 years ago

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.

worktycho commented 10 years ago

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.

madmaxoft commented 10 years ago

But those can't be typed on a keyboard.

worktycho commented 10 years ago

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.

madmaxoft commented 10 years ago

The point is that they're exposed.

worktycho commented 10 years ago

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

bearbin commented 10 years ago

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

worktycho commented 10 years ago

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.

NiLSPACE commented 10 years ago

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

Masy commented 10 years ago

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

bearbin commented 10 years ago

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.

Masy commented 10 years ago

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

tigerw commented 10 years ago

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

worktycho commented 10 years ago

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