Country Flags
Show each player's country flag as a head next to their name. The country is found from the player's IP, or the player picks it.
Commands
/countryflags # open the flag menu
/countryflags <country> # pick by name or two letter code
/countryflags reset # remove your choice
Aliases: /countryflag, /flags, /country. Permission: shyamduels.country (everyone has it). Show flags in tab, scoreboards and duels with the country placeholders.
Finding the Country
When a player joins, their country is found from their IP with the free MaxMind GeoLite2 database. The plugin downloads it for you.
country:
enabled: true
default-enabled: true # flags shown for new players
update-on-join: true # check the IP again on each join
maxmind:
database: "GeoLite2-Country.mmdb"
auto-download: true
- A flag the player picked by hand is never changed by the IP check.
- Behind Velocity, turn on modern forwarding in Velocity and in
config/paper-global.yml(proxies.velocity.enabled: trueand the same secret). If not, every player gets the country of the proxy. - Local and private IPs are skipped.
Hiding the Flag
Players can hide their flag in /settings. flag-hiding sets who may do this:
| Value | Who can hide their flag |
|---|---|
everyone | Every player. |
small-countries | Only players from countries not in large-countries. A flag from a big country cannot point to one person, so those players always show it. This is the default for new installs. |
nobody | Nobody. Flags always show. |
country:
flag-hiding: small-countries
large-countries: [US, CA, MX, BR, GB, DE, FR, IN, CN, JP, ...]
Servers that update get everyone, so nothing changes until you pick another value.
For Developers
Use ShyamDuelsProvider.require().country(). See CountryService, PlayerCountryChangeEvent and Code Examples.
All Countries (224)
These are the names shown in game. Use a name with /countryflags <name>, or its two-letter code:
| Name | Code | Name | Code | Name | Code |
|---|---|---|---|---|---|
| Afghanistan | AF | Albania | AL | Algeria | DZ |
| Andorra | AD | Angola | AO | Anguilla | AI |
| Antarctica | AQ | Antigua & Barbuda | AG | Argentina | AR |
| Armenia | AM | Aruba | AW | Australia | AU |
| Austria | AT | Azerbaijan | AZ | Bahamas | BS |
| Bahrain | BH | Bangladesh | BD | Barbados | BB |
| Belarus | BY | Belgium | BE | Belize | BZ |
| Benin | BJ | Bermuda | BM | Bhutan | BT |
| Bolivia | BO | Bosnia & Herzegovina | BA | Botswana | BW |
| Brazil | BR | British Indian Ocean Territory | IO | Brunei | BN |
| Bulgaria | BG | Burkina Faso | BF | Burundi | BI |
| Cambodia | KH | Cameroon | CM | Canada | CA |
| Cape Verde | CV | Caribbean Netherlands | BQ | Central African Republic | CF |
| Chad | TD | Chile | CL | China | CN |
| Colombia | CO | Comoros | KM | Congo - Brazzaville | CG |
| Congo - Kinshasa | CD | Cook Islands | CK | Costa Rica | CR |
| Croatia | HR | Cuba | CU | Curaçao | CW |
| Cyprus | CY | Czechia | CZ | Côte d’Ivoire | CI |
| Denmark | DK | Djibouti | DJ | Dominica | DM |
| Dominican Republic | DO | Ecuador | EC | Egypt | EG |
| El Salvador | SV | Equatorial Guinea | GQ | Eritrea | ER |
| Estonia | EE | Eswatini | SZ | Ethiopia | ET |
| Faroe Islands | FO | Fiji | FJ | Finland | FI |
| France | FR | French Guiana | GF | French Polynesia | PF |
| Gabon | GA | Gambia | GM | Georgia | GE |
| Germany | DE | Ghana | GH | Gibraltar | GI |
| Greece | GR | Greenland | GL | Grenada | GD |
| Guadeloupe | GP | Guatemala | GT | Guernsey | GG |
| Guinea | GN | Guinea-Bissau | GW | Guyana | GY |
| Haiti | HT | Honduras | HN | Hong Kong SAR China | HK |
| Hungary | HU | Iceland | IS | India | IN |
| Indonesia | ID | Iran | IR | Iraq | IQ |
| Ireland | IE | Israel | IL | Italy | IT |
| Jamaica | JM | Japan | JP | Jersey | JE |
| Jordan | JO | Kazakhstan | KZ | Kenya | KE |
| Kiribati | KI | Kuwait | KW | Kyrgyzstan | KG |
| Laos | LA | Latvia | LV | Lebanon | LB |
| Lesotho | LS | Liberia | LR | Libya | LY |
| Liechtenstein | LI | Lithuania | LT | Luxembourg | LU |
| Macao SAR China | MO | Madagascar | MG | Malawi | MW |
| Malaysia | MY | Maldives | MV | Mali | ML |
| Malta | MT | Marshall Islands | MH | Martinique | MQ |
| Mauritania | MR | Mauritius | MU | Mexico | MX |
| Micronesia | FM | Moldova | MD | Monaco | MC |
| Mongolia | MN | Montenegro | ME | Morocco | MA |
| Mozambique | MZ | Myanmar (Burma) | MM | Namibia | NA |
| Nauru | NR | Nepal | NP | Netherlands | NL |
| New Caledonia | NC | New Zealand | NZ | Nicaragua | NI |
| Niger | NE | Nigeria | NG | North Korea | KP |
| North Macedonia | MK | Norway | NO | Oman | OM |
| Pakistan | PK | Palau | PW | Palestinian Territories | PS |
| Panama | PA | Papua New Guinea | PG | Paraguay | PY |
| Peru | PE | Philippines | PH | Poland | PL |
| Portugal | PT | Puerto Rico | PR | Qatar | QA |
| Romania | RO | Russia | RU | Rwanda | RW |
| Réunion | RE | Samoa | WS | San Marino | SM |
| Saudi Arabia | SA | Senegal | SN | Serbia | RS |
| Seychelles | SC | Sierra Leone | SL | Singapore | SG |
| Sint Maarten | SX | Slovakia | SK | Slovenia | SI |
| Solomon Islands | SB | Somalia | SO | South Africa | ZA |
| South Korea | KR | South Sudan | SS | Spain | ES |
| Sri Lanka | LK | St. Barthélemy | BL | St. Kitts & Nevis | KN |
| St. Lucia | LC | St. Pierre & Miquelon | PM | St. Vincent & Grenadines | VC |
| Sudan | SD | Suriname | SR | Sweden | SE |
| Switzerland | CH | Syria | SY | São Tomé & Príncipe | ST |
| Taiwan | TW | Tajikistan | TJ | Tanzania | TZ |
| Thailand | TH | Timor-Leste | TL | Togo | TG |
| Tonga | TO | Trinidad & Tobago | TT | Tunisia | TN |
| Turkmenistan | TM | Tuvalu | TV | Türkiye | TR |
| U.S. Virgin Islands | VI | Uganda | UG | Ukraine | UA |
| United Arab Emirates | AE | United Kingdom | GB | United States | US |
| Uruguay | UY | Uzbekistan | UZ | Vanuatu | VU |
| Vatican City | VA | Venezuela | VE | Vietnam | VN |
| Wallis & Futuna | WF | Yemen | YE | Zambia | ZM |
| Zimbabwe | ZW | Åland Islands | AX |