Skip to content

TvT Teams Color

Featured Replies

Hi, does anyone help me with this? I'm trying to set a color on the times of my tvt!

 

 

so it was done to define team colors


    public static void prepareNameAndTitle()
    {
        for (Player player : _teams[0].getParticipatedPlayers().values())
        {
            if (player != null)
            {
                player.getAppearance().setTitleColor(Config.TVT_EVENT_TEAM_TEAM_BLUE_COLOR);
                player.getAppearance().setNameColor(Config.TVT_EVENT_TEAM_TEAM_BLUE_COLOR);
            }
        }
        
        for (Player player : _teams[1].getParticipatedPlayers().values())
        {
            if (player != null)
            {
                player.getAppearance().setTitleColor(Config.TVT_EVENT_TEAM_TEAM_RED_COLOR);
                player.getAppearance().setNameColor(Config.TVT_EVENT_TEAM_TEAM_RED_COLOR);
            }
        }
    }
    

when the event is over I was forced to use it to exit the colors of TVT

 

for (TvTEventTeam team : _teams)
        {
            for (Player player : team.getParticipatedPlayers().values())
            {
                // Check for nullpointer
                if (player != null)
                {
                    player.clearEventScore();
                    player.getAppearance().setTitleColor(0xFFFF77);
                    player.getAppearance().setNameColor(0xFFFFFF);
                    
                    // Teleport back.
                    new TvTEventTeleporter(player, (player.getTeam() == 1 ? Config.TVT_EVENT_PARTICIPATION_NPC_LOCATION : Config.TVT_EVENT_PARTICIPATION_NPC_LOCATION), false);
                }
            }
        }

 

I do not restore the original colors because I am setting the white color as soon as I exit the tvt how can I define each team and a color in charinfo and userinfo

Before teleport to event, store their colors and then set it back using that variable. Eventually play with char user info. 

  • Author
1 hour ago, SweeTs said:

Before teleport to event, store their colors and then set it back using that variable. Eventually play with char user info. 

 

 

save as in vector?

5 minutes ago, l2jkain said:

 

 

save as in vector?

how you will do that?

 

int type is the correct

Under a Map<Player, Integer> for example or use 'memos' system, if using acis. 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.