Prevent colored map author name from tainting gameover (#1922)

This commit is contained in:
Patrick 'Quezler' Mounier 2020-04-26 16:59:27 +02:00 committed by GitHub
parent fa62336096
commit 0589290380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,7 +140,7 @@ public class ServerControl implements ApplicationListener{
Call.onInfoMessage((state.rules.pvp
? "[YELLOW]The " + event.winner.name + " team is victorious![]" : "[SCARLET]Game over![]")
+ "\nNext selected map:[accent] " + map.name() + "[]"
+ (map.tags.containsKey("author") && !map.tags.get("author").trim().isEmpty() ? " by[accent] " + map.author() + "[]" : "") + "." +
+ (map.tags.containsKey("author") && !map.tags.get("author").trim().isEmpty() ? " by[accent] " + map.author() + "[white]" : "") + "." +
"\nNew game begins in " + roundExtraTime + "[] seconds.");
info("Selected next map to be {0}.", map.name());