kangarko / ChatControl-Pro

The ultimate chat solution. Prevent spam, ads, swears and even bots on your server. Replaced by ChatControl Red: https://mineacademy.org/chatcontrol-red
Other
65 stars 8 forks source link

How heavy is to have "First_Part" with condition for each group (formatting.yml) #2353

Closed TheJoshue closed 2 years ago

TheJoshue commented 2 years ago

This question is related to formatting.yml config file

If we have formatting enabled, how heavy will it be if we have condition for ranks, to display their groups? You know plugin Essentials (really doesn't matter anything about it but the CHAT HANDLING feature) there is an option to FULLY customize EACH group's chat format (if you want to separate it by groups) Now, we can do this on CHCPRO too, however, we need to use conditions. Now i wanted to ask, could we get this "feature" (i'm saying in quotes because this feature already exists you just need to make it how you wish) redesigned in any way to be like essentials'? so we can customize chat format for EACH group, if we want.

Why i am asking this? Because i am not sure how heavy the example below will be and have impact on performance, can you tell me please? If this will have a lot of impact on performance (CONSIDER IF SOMEONE HAS 10 RANKS AND CONDITION FOR ALL 10 RANKS HERE, SO HE HAS 10X "First_Part" THINGY), I assume that breaking this down into how essentialsChat works and how configurability works there would help it?

Please respond to this and i think this would be the final "bigger" thing to be done (to optimize this if making conditions will be heavy if we make it for 5+ groups) here after the final end of life for CHCPRO! Thank you so much for existing!

----- This part is copied from default config and edited for an example.

Formats:
  Chat:
    First_Part_DEFAULT:
      Condition: '"{vault_group}" == "Default"'
      Message: "&8[&fMember&8]"
      Hover_Event:
        Action: SHOW_TEXT
        Values:
          - "&8*-----* &f{player} &8*-----*"
          - "&7Prefix&8: &7{pl_prefix}"
          - "&7Group&8: &b{pl_group}"
    First_Part_VIP:
      Condition: '"{vault_group}" == "VIP"'
      Message: "&8[&6VIP&8]"
      Hover_Event:
        Action: SHOW_TEXT
        Values:
          - "&8*-----* &f{player} &8*-----*"
          - "&7Prefix&8: &7{pl_prefix}"
          - "&7Group&8: &b{pl_group}"
    Second_Part:
      Message: "{player}&7: &f"
      Hover_Event:
        Action: SHOW_TEXT
        Values:
          - "&7Message issued: &b{timestamp}"
          - "&7Click to send a message"
      Click_Event:
        Action: SUGGEST_COMMAND
        Value: '/msg {player} '
    Third_Part:
      Message: "{message}"
kangarko commented 2 years ago

Thank you. We are however no longer adding features like this to ChatControl Pro. I can consider this for ChatControl Red :)

TheJoshue commented 2 years ago

Thank you. We are however no longer adding features like this to ChatControl Pro. I can consider this for ChatControl Red :)

Can you please answer this then; quoting from my post

If we have formatting enabled, how heavy will it be if we have condition for ranks, to display their groups?

(CONSIDER IF SOMEONE HAS 10 RANKS AND CONDITION FOR ALL 10 RANKS HERE, SO HE HAS 10X "First_Part" THINGY)

TheJoshue commented 2 years ago

I really want to make this and do the First_Part for 5-10 groups, however I don't know if it'll be ok to have 10 "First_Part"-s each with condition for another group... How heavy that will be and i want honest answer.

kangarko commented 2 years ago

Should not be heavy as performance-wise. I have seen people using this and it's been working fine for them...