@@ -85,7 +85,10 @@ public long getChunkKey() {
8585 }
8686
8787 public List <String > getContributorNames () {
88- return contributors .stream ().map (uniqueId -> Bukkit .getPlayer (uniqueId ).getName ()).toList ();
88+ return contributors .stream ().map (uniqueId -> {
89+ final var player = Bukkit .getPlayer (uniqueId );
90+ return player != null ? player .getName () : uniqueId .toString ();
91+ }).toList ();
8992 }
9093
9194 private static ItemStack getBannerItem (Location location ) {
@@ -104,14 +107,9 @@ private static ItemStack getDisplayItem(Location location) {
104107 if (itemMeta .hasDisplayName ()) {
105108 itemMeta .displayName (itemMeta .displayName ().decoration (TextDecoration .ITALIC , false ));
106109 }
107- var vectorComponent = Component .text ()
108- .color (NamedTextColor .GRAY )
109- .append (Component .text (location .getBlockX ()))
110- .append (Component .space ())
111- .append (Component .text (location .getBlockY ()))
112- .append (Component .space ())
113- .append (Component .text (location .getBlockZ ()))
114- .build ();
110+ var vectorComponent = Component .text (
111+ String .format ("%d %d %d" , location .getBlockX (), location .getBlockY (), location .getBlockZ ()),
112+ NamedTextColor .GRAY );
115113 var worldComponent = Component .text (location .getWorld ().getName (), NamedTextColor .GRAY );
116114 itemMeta .lore (List .of (vectorComponent , worldComponent ));
117115 itemStack .setItemMeta (itemMeta );
0 commit comments