Skip to content

Commit

Permalink
Merge branch 'master' into description-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Anakinnnnn authored Oct 19, 2024
2 parents bf25c65 + 23e882d commit 2d13362
Show file tree
Hide file tree
Showing 219 changed files with 1,373 additions and 191 deletions.
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- You can view our patterns here: [metadata.schema.json](https://github.com/LunarClient/ServerMappings/blob/master/metadata.schema.json), or take a look below and complete the field checklist:
- [ ] `id`: a lowercase string, which should match the folder name _(ex. `myserver`)_
- [ ] `name`: a string _(ex. `MyServerPvP`)_
- [ ] `description`: hook between 16 and 80 characters _(ex. `Home of Competitive Minecraft PvP`)_
- [ ] `description`: hook between 16 and 80 characters in English _(ex. `Home of Competitive Minecraft PvP`)_
- [ ] `addresses`: an array with lowercase strings _(ex. `["my.server", "your-server.com"]`)_
- You do not need to specify subdomains, Lunar Client services automatically detect them.
- [ ] `primaryAddress`: the primary address that people connect to with (please include the subdomain if required) _(ex. `mc.my.server`)_
Expand All @@ -26,6 +26,7 @@
- [ ] `gameTypes`: a list of games that describe the content on your server, must be a max of 3 listed _(ez. `["PVP", "UHC", "HCF"]`)_
- [ ] `crossplay`: whether the server has support for Bedrock Edition players (through proxies such as [GeyserMC](https://geysermc.org/))
- [ ] (optional) `presentationVideo`: YouTube video ID (in slug) to server trailer / introduction _(ex. `7EV4cPuJvXE`)_
- [ ] (optional) `votingLinks`: an array of urls to your server's listing on voting websites _(ex. `["https://minecraft-mp.com/server-s179012"]`)_
- [ ] (optional) `website`: url of server website, must include URL schema (http:// or https://) _(ex. `https://www.your-server.com`)_
- [ ] (optional) `store`: url of server store, must include URL schema (http:// or https://) _(ex. `https://store.your-server.com`)_
- [ ] (optional) `wiki`: url of server wiki, must include URL schema (http:// or https://) _(ex. `https://wiki.your-server.com`)_
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/validate-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request_target:
branches:
- "*"
schedule:
- cron: "0 0 * * *"

jobs:
changes:
Expand Down Expand Up @@ -70,7 +72,7 @@ jobs:
upload-servers:
name: Upload Servers
needs: [validate-servers, changes]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'schedule'
runs-on: ubuntu-latest

permissions:
Expand All @@ -89,9 +91,12 @@ jobs:
- name: Install Python dependencies
run: pip install -r .scripts/requirements.txt

- name: Create output folder
- name: Create server output folder
run: mkdir .out/

- name: Create Crowdin upload folder
run: mkdir -p ServerMappings/locales/

- name: Output Server Media
run: |
python .scripts/convert_media.py \
Expand All @@ -113,10 +118,25 @@ jobs:
python .scripts/create_index.py \
--servers_dir servers \
--inactive_file inactive.json \
--translations_output ServerMappings/locales/en_US.json \
--json_output .out/servers.json \
--csv_output .out/servers.csv \
--no-include_inactive
- name: Sync to Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: false
upload_sources_args: "--preserve-hierarchy"
source: ServerMappings/locales/en_US.json
translation: ServerMappings/locales/%locale%.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: "424304"
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_TOKEN }}

- name: Upload to Cloudflare
env:
R2_ENDPOINT: ${{ secrets.R2_ENDPOINT }}
Expand Down
18 changes: 16 additions & 2 deletions .scripts/create_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import csv
import json

from utils import get_all_servers
from utils import get_all_servers, collect_translations


def main():
Expand All @@ -18,6 +18,7 @@ def main():
parser.add_argument("--servers_dir", required=True, type=str)
parser.add_argument("--inactive_file", required=True, type=str)
parser.add_argument("--json_output", required=True, type=str)
parser.add_argument("--translations_output", required=True, type=str)
parser.add_argument("--csv_output", required=True, type=str)
parser.add_argument("--include_inactive", action=argparse.BooleanOptionalAction)
args = parser.parse_args()
Expand All @@ -29,6 +30,18 @@ def main():
args.include_inactive,
)

# Create a new object for translations
translations = collect_translations(servers)

# Write the new JSON object to a file
try:
json_object = json.dumps(translations, indent=4)
with open(args.translations_output, "w", encoding="utf-8") as outfile:
outfile.write(json_object)
except Exception as e:
print("Error writing to Translations: ", e)
raise

# Write to JSON file
try:
json_object = json.dumps(servers, indent=4)
Expand Down Expand Up @@ -71,7 +84,8 @@ def main():
"presentationVideo",
"modpack",
"tebexStore",
"images"
"images",
"votingLinks",
],
)
writer.writeheader()
Expand Down
19 changes: 18 additions & 1 deletion .scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,4 +400,21 @@ def validate_wordmark(path: str, server_name: str) -> list[str]:
)


return errors
return errors


def collect_translations(servers: list[dict]) -> dict:
"""
Collects the translations from the servers list
Parameters:
servers (list): The list of servers.
Returns:
dict: A dictionary of server IDs and their descriptions.
"""
translations = {}
for server in servers:
if 'description' in server:
translations[server['id']] = { "description": server['description'] }
return translations
24 changes: 18 additions & 6 deletions docs/adding-servers/metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ An example can also be found in the root, `metadata.example.json`. This contains

Below is a table of the basic fields that are required for your server's metadata file, and a brief description of what they are.

| Field | Description |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id` | This is the ID for the server, discussed in the [overview](server-mappings/adding-servers/overview), this must match the name of your server's folder. |
| `name` | This is the name for your server. |
| `description` | This is the description for your server. It must be **between 16-80 characters**. |
| Field | Description |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id` | This is the ID for the server, discussed in the [overview](server-mappings/adding-servers/overview), this must match the name of your server's folder. |
| `name` | This is the name for your server. |
| `description` | This is the description for your server. It must be **between 16-80 characters** and in English. The Lunar Client translation team is responsible for translating this to server other supported languages. |

### Addresses

The `addresses` array in each server object is actually an array of IP suffixes. **This should not include the subdomain for the server**.

| ✅ Correct | ❌ Incorrect |
| ✅ Correct | ❌ Incorrect |
| ------------- | ------------------ |
| `example.com` | `play.example.com` |
| `hypixel.net` | `play.hypixel.net` |
Expand Down Expand Up @@ -101,3 +101,15 @@ You can provide any social media links that you would like to be displayed on yo
- `reddit`
- `tiktok`
- `facebook`

### Voting Links

You can provide any voting links that you would like to be displayed on your server's page. These should be under the `votingLinks` key.

> Note: These links should be the actual listing of the server, rather than the voting tab of said listing.
Example:

| ❌ Incorrect | ✅ Correct |
| ------------------------------------------ | -------------------------------------------- |
| `https://minecraftservers.org/vote/467177` | `https://minecraftservers.org/server/467177` |
3 changes: 1 addition & 2 deletions inactive.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"arcadiamc",
"arcane",
"arceus",
"arctis",
"ariacraft",
"ascendantmc",
"ateahcf",
Expand Down Expand Up @@ -153,7 +154,6 @@
"valent",
"valley",
"veal",
"vealypvp",
"vestpvp",
"vibria",
"vicnix",
Expand Down Expand Up @@ -263,6 +263,5 @@
"shikamc",
"plasma",
"evamc",
"sakurapvp",
"voidmc"
]
6 changes: 6 additions & 0 deletions metadata.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
"merch": {
"$ref": "#/definitions/WebAddress"
},
"votingLinks": {
"type": "array",
"items": {
"$ref": "#/definitions/WebAddress"
}
},
"compliance": {
"type": "object",
"additionalProperties": false,
Expand Down
12 changes: 6 additions & 6 deletions servers/aetheriamc/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
"id": "aetheriamc",
"name": "AetheriaMC",
"store": "https://store.aetheria.world/",
"description": "A 1.20 team-based survival server",
"description": "A 1.21 team-based survival server",
"addresses": [
"aetheria.world",
"aetheriamc.xyz"
"aetheria.world"
],
"primaryAddress": "aetheria.world",
"primaryColor": "#f8100c",
"secondaryColor": "#3aebef",
"minecraftVersions": [
"1.20.*"
"1.20.*",
"1.21.*"
],
"primaryMinecraftVersion": "1.20.4",
"primaryMinecraftVersion": "1.21",
"crossplay": true,
"primaryRegion": "NA",
"regions": [
Expand All @@ -23,7 +23,7 @@
"Survival"
],
"socials": {
"discord": "https://discord.gg/W47njzxcef",
"discord": "https://discord.gg/se4z8bq7St",
"twitter": "AetheriaMC"
}
}
1 change: 0 additions & 1 deletion servers/aide-reseaux/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"id": "aide-reseaux",
"name": "Aide Réseaux",
"description": "Serveur Minecraft d'animations d'Aide Réseaux.",
"addresses": [
"aidereseaux.fr"
],
Expand Down
Binary file added servers/akaimc/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added servers/akaimc/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions servers/akaimc/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"id": "akaimc",
"name": "AkaiMC",
"primaryAddress": "play.akaimc.it",
"addresses": [
"akaimc.it"
],
"gameTypes": [
"PvP",
"Survival"
],
"primaryColor": "#cb84da",
"secondaryColor": "#ffffff",
"primaryMinecraftVersion": "1.8.9",
"minecraftVersions": [
"1.7.*",
"1.8.*",
"1.12.*",
"1.16.*",
"1.17.*",
"1.18.*",
"1.19.*",
"1.20.*",
"1.21.*"
],
"primaryLanguage": "it",
"languages": [
"it"
],
"primaryRegion": "EU",
"regions": [
"EU"
],
"website": "https://akaimc.it/",
"store": "https://store.akaimc.it/",
"socials": {
"discord": "https://discord.com/invite/aquariusmc-network-797846407070613505",
"instagram": "akaimc.it",
"telegram": "AkaiMC",
"tiktok": "@AkaiMC"
}
}
2 changes: 1 addition & 1 deletion servers/alinium/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "alinium",
"name": "Alinium",
"description": "Le meilleur serveur survie, élu par nous même.",
"description": "The best survival server, elected by ourselves.",
"addresses": [
"alinium.fr"
],
Expand Down
2 changes: 1 addition & 1 deletion servers/alphainfinity/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "alphainfinity",
"name": "Alpha Infinity",
"website": "https://alpha-infinity.fr/",
"description": "Alpha Infinity, vise le grade Alpha, avec quêtes, mondes unique.",
"description": "Alpha Infinity, aim for the Alpha rank, with quests, unique worlds.",
"addresses": [
"alpha-infinity.fr"
],
Expand Down
2 changes: 1 addition & 1 deletion servers/amperiamc/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "amperiamc",
"name": "AmperiaMC",
"description": "PVPBox Ranked ! Bon PvP, système de TeamFight de Clan !",
"description": "PVPBox Ranked! Good PvP, Clan TeamFight system!",
"addresses": [
"amperiamc.fr"
],
Expand Down
Binary file added servers/andromedapvp/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added servers/andromedapvp/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions servers/andromedapvp/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"id": "andromedapvp",
"name": "AndromedaPVP",
"store": "https://andromedapvp.craftingstore.net/",
"addresses": [
"andromedapvp.xyz"
],
"primaryAddress": "andromedapvp.xyz",
"minecraftVersions": [
"1.21.1"
],
"primaryMinecraftVersion": "1.21",
"primaryColor": "#fbf6e4",
"secondaryColor": "#8677ad",
"primaryLanguage": "pt-PT",
"languages": [
"pt-PT"
],
"primaryRegion": "EU",
"regions": [
"EU"
],
"gameTypes": [
"Survival"
],
"socials": {
"discord": "https://discord.com/invite/eMGpBSrSEs",
"tiktok": "andromedapvp",
"youtube": "andromedapvp"
}
}
2 changes: 1 addition & 1 deletion servers/angelsky/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "angelsky",
"name": "AngelSky",
"description": "Découvrez le Skyblock, autrement",
"description": "Discover Skyblock in a different way",
"store": "https://store.angelsky.fr/",
"addresses": [
"angelsky.fr"
Expand Down
2 changes: 1 addition & 1 deletion servers/ankkamaa/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "ankkamaa",
"name": "AnkkaMaa",
"website": "https://ankkamaa.fi/",
"description": "AnkkaMaa on Minecraft- ja Discord-palvelin. Tutustu palvelimeen liittymällä!",
"description": "AnkkaMaa is a Minecraft and Discord server. Discover the server by joining!",
"addresses": [
"ankkamaa.fi"
],
Expand Down
2 changes: 1 addition & 1 deletion servers/arceusmc/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "ArceusMC",
"website": "https://www.newarceusmc.it",
"store": "https://store.newarceusmc.it",
"description": "Un server adatto per tutte le età!",
"description": "A server suitable for all ages!",
"addresses": [
"newarceusmc.it"
],
Expand Down
2 changes: 1 addition & 1 deletion servers/arkamc/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "arkamc",
"name": "ArkaMc",
"description": "ArkaMc, un serveur PvP/Faction Farm2Win avec un thème inédit !",
"description": "ArkaMc, a PvP/Faction Farm2Win server with a new theme!",
"addresses": [
"arkamc.fr"
],
Expand Down
Loading

1 comment on commit 2d13362

@LunarClientBot
Copy link
Collaborator

@LunarClientBot LunarClientBot commented on 2d13362 Oct 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📄 Documentation Deployment

Status:✅ Completed
Environment:preview
URL:https://1c8f95ea.lunarclient-dev.pages.dev

Please sign in to comment.