malte-laukoetter / Laborus

a customisable sponge job plugin
https://ore.spongepowered.org/Lergin/Laborus
MIT License
1 stars 3 forks source link

Color xp notification #10

Closed crymates closed 7 years ago

crymates commented 7 years ago

Can u pls add that you can define colors for the notifications?

E.g. Miner in green and the XP in grey (make it configurable in the config).

color_job=§2
color_xp=§7

Color Codes

2017-03-08_11 49 47

malte-laukoetter commented 7 years ago

This should also be possible after i have moved all of the messages to the configuration file (yes there are already there but not really usable ;) )

crymates commented 7 years ago

I'll take a look at it :P

malte-laukoetter commented 7 years ago

I will track this in #11

malte-laukoetter commented 7 years ago

You can now configure that in the config through setting the following setting:

translations {
    en {
        "JOB_XP_ACTION_BAR" {
            arguments {
                "job.name" {
                    optional=false
                }
                "job.xp" {
                    optional=false
                }
                "job.xp_for_next_level" {
                    optional=false
                }
            }
            content {
                extra=[
                    {
                        color=green
                        text="{job.name}"
                    },
                    {
                        text=": "
                    },
                    {
                        color=gray
                        text="{job.xp}"
                    },
                    {
                        text=" / "
                    },
                    {
                        color=gray
                        text="{job.xp_for_next_level}"
                    }
                ]
                text=""
            }
            options {
                closeArg="}"
                openArg="{"
            }
        }
    }
}

crymates commented 7 years ago

FANTASTIC MATE!

crymates commented 7 years ago

And depending on your translation system: How do player choose which language they wanna use?

malte-laukoetter commented 7 years ago

I maybe be able to add some more parameters to the messages so something like your message can be possible.

The language is the same that is used by minecraft itself and if no translation for that language is there it will fallback to the default language of the server or if also there is no translation for that language to the highest placed language in the config file. By the way i had planned to make the fallback languages configurable.

crymates commented 7 years ago

Maybe show all possible parameters in config as an comment :)

malte-laukoetter commented 7 years ago

I will write them down somewhere most likely in the wiki here on github and on a page on ore :)

17

malte-laukoetter commented 7 years ago

They are now available on the GitHub Pages and on Sponge Ore

crymates commented 7 years ago

It is possible to setup COMMAND_CHANGE_MISSING_JOB_PERMISSION messages per job? So different messages for miner, hunter, farmer, etc.