File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
GradCraft/src/main/java/university/quaranteen/gradcraft/ceremony Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 11
11
import com .sk89q .worldguard .protection .managers .RegionManager ;
12
12
import com .sk89q .worldguard .protection .regions .ProtectedRegion ;
13
13
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 ;
14
17
import org .bukkit .Location ;
15
18
import org .bukkit .World ;
16
19
import org .bukkit .entity .Player ;
@@ -143,12 +146,22 @@ public void notifySpectators() {
143
146
.blue (currentGraduate .getDegreeLevel ())
144
147
.white (" - " )
145
148
.blue (currentGraduate .getMajor ())
146
- .newLine ()
147
- .aqua (currentGraduate .getUniversityName ())
148
149
.toString ())
149
150
.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
+
150
162
for (Player p : players ) {
151
163
p .sendTitle (t );
164
+ p .sendMessage (toSend );
152
165
}
153
166
}
154
167
You can’t perform that action at this time.
0 commit comments