From f3fcbba5416a85305e5e7e6b0da1807b17830e69 Mon Sep 17 00:00:00 2001 From: Seth Winston Date: Sun, 20 Aug 2017 21:15:50 -0400 Subject: [PATCH] Allow build organizations to be defined in XML I would like this for this to be a thing If not then close me because I have no idea how to code --- .../main/java/tc/oc/pgm/commands/MapCommands.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PGM/src/main/java/tc/oc/pgm/commands/MapCommands.java b/PGM/src/main/java/tc/oc/pgm/commands/MapCommands.java index e820947..54fad46 100644 --- a/PGM/src/main/java/tc/oc/pgm/commands/MapCommands.java +++ b/PGM/src/main/java/tc/oc/pgm/commands/MapCommands.java @@ -232,6 +232,20 @@ public class MapCommands implements Commands { } } + List organizations = mapInfo.getNamedOrganizations(); + if(organizations.size() == 1) { + audience.sendMessage(new Component( + mapInfoLabel("command.map.mapInfo.organizationSingular"), + formatContribution(organizations.get(0)) + )); + } else if(!organizations.isEmpty()) { + audience.sendMessage(mapInfoLabel("command.map.mapInfo.organizationPlural")); + for(Contributor organization : organizations) { + audience.sendMessage(new Component(" ").extra(formatContribution(organization))); + } + } + + if(mapInfo.rules.size() > 0) { audience.sendMessage(mapInfoLabel("command.map.mapInfo.rules"));