Parkour icon indicating copy to clipboard operation
Parkour copied to clipboard

Colors for signs

Open EdyTheCow opened this issue 5 years ago • 2 comments

Add the ability to add colors to the signs. The most simple solution would be allowing user to add color codes on the sign itself. As for first line that says [Parkour], link that to the string located in strings.yml. That way user has full control over the sign colors.

EdyTheCow avatar Dec 29 '18 01:12 EdyTheCow

There are 3 ways this can possibly be achieved.

  1. We add a configuration to ignore all Parkour sign validation in the onSignCreate method in SignListener, this would be dangerous as the user would have to know all the signs syntaxes.
  2. We add a string configuration that will be prefixed before all sign headings, something like '&b%HEADING%'.
  3. We can convert the input from the Sign header into the Bukkit colour format, using the Utils.colour(s) method, then strip the color from it for the validation check. (I do this in the Carz plugin), however this is going to need quite a lot of code change for Parkour. Any opinions, @EdyTheCow, @steve4744?

A5H73Y avatar Jan 02 '19 21:01 A5H73Y

2 - its by far the easiest for the same result.

or possibly:

  1. Add this to the config, and prefix the text when the sign is created:
signColours:
      heading: &6
      join: &1
      leave: &c
      ...
      coursename: &0

or even simpler

signColours:
      heading: &6
      line1: &1
      line2: &0
      line3: &c

steve4744 avatar Jan 02 '19 23:01 steve4744