Skip to content

Commit 39e108c

Browse files
committed
Merge branch 'master' of github.com:Quaranteens/GradCraft
2 parents ea751c0 + 41ca99e commit 39e108c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

GradCraft/src/main/java/university/quaranteen/gradcraft/ceremony/StageController.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
import com.sk89q.worldguard.protection.managers.RegionManager;
1212
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
1313
import com.sk89q.worldguard.protection.regions.RegionContainer;
14+
import net.md_5.bungee.api.ChatColor;
15+
import net.md_5.bungee.api.chat.BaseComponent;
16+
import net.md_5.bungee.api.chat.ComponentBuilder;
1417
import org.bukkit.Location;
1518
import org.bukkit.World;
1619
import org.bukkit.entity.Player;
@@ -143,12 +146,22 @@ public void notifySpectators() {
143146
.blue(currentGraduate.getDegreeLevel())
144147
.white(" - ")
145148
.blue(currentGraduate.getMajor())
146-
.newLine()
147-
.aqua(currentGraduate.getUniversityName())
148149
.toString())
149150
.build();
151+
152+
// trying this out - all formatting applies to the last item appended
153+
ComponentBuilder msg = new ComponentBuilder();
154+
msg.append(currentGraduate.getName() + "\n").bold(true).color(ChatColor.AQUA);
155+
msg.append(currentGraduate.getDegreeLevel()).color(ChatColor.BLUE);
156+
msg.append(" - ").color(ChatColor.WHITE);
157+
msg.append(currentGraduate.getMajor() + "\n").color(ChatColor.BLUE);
158+
msg.append(currentGraduate.getUniversityName() + "\n").color(ChatColor.BLUE);
159+
160+
BaseComponent[] toSend = msg.getParts().toArray(BaseComponent[]::new);
161+
150162
for (Player p : players) {
151163
p.sendTitle(t);
164+
p.sendMessage(toSend);
152165
}
153166
}
154167

0 commit comments

Comments
 (0)