Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.41k stars 377 forks source link

fix: /help, /me, and /p commands can't work in non-English languages #3039

Open ACaiCat opened 1 month ago

ACaiCat commented 1 month ago

When TShock runs in a non-English language, vanilla commands prefix will be localized.

eg.(Chinese) /help (English command prefix) => /帮助 (Chinese command prefix)

TShock.OnChat cannot correctly handle vanilla command prefixes

e.g.(Chinese) When a player use /help, TShock will execute /帮助 (causing the command to not be found). image

Invalid command entered. Type /help for a list of valid commands.

This PR add EnglishLanguage.GetCommandPrefixByName to get English vanilla command prefix.

image

ACaiCat commented 1 month ago

Solve #2914