MCTowns

MCTowns

52.4k Downloads

Chat prefix

Troydesante opened this issue ยท 3 comments

commented

Hi,
Can you please add a chat prefix for essentials chat?
like [Town1]playername:
A lot of my players ask for this and it would be really helpfull for admins on my server.
Now when we give help we always need to ask like what is your town name...

Regards,
Troy

commented

Sorry I mean like
[Townname]playername: [message]

commented

Sounds good, slating this for 2.5.0

commented

I did a little work on this in 23626e7

There does not appear to be any way to just add a single thing into someone's chat prefix in a way that I can manage it at all. I could just inject it into their prefix at a certain spot, but it would be very difficult to remove it reliably without messing up the rest of their prefix.

I could also "hijack" the entire format of the chat message, but that would be majorly incompatible with all other chat plugins, or it could just get overwritten if another plugin has higher priority.

I tried dynamically making permission groups for each town, since that's something I've been meaning to look into for a while, and as it turns out Vault doesn't offer API for creating or deleting permission groups. Apparently, some permission systems will let you make new groups by just adding players to that group and it'll make it if it doesn't exist, but then since creating and adding groups are the same thing, it's then possible to add players to the "Admin" group by making a town named Admin. This could be worked around, but it makes me nervous.

Anyway, this needs more research, and I need to track down a Vault guy to ask their opinion.