File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Item Creator/src/main/java/org/broken/arrow/library/itemcreator/meta/map Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 22
33
44import org .broken .arrow .library .itemcreator .ItemCreator ;
5+ import org .broken .arrow .library .itemcreator .utility .FormatString ;
56import org .bukkit .Bukkit ;
67import org .bukkit .World ;
78import org .bukkit .inventory .meta .MapMeta ;
@@ -344,12 +345,15 @@ public static int retrieveMapId(@Nonnull final MapView mapView) {
344345
345346 @ Override
346347 public String toString () {
347- return "id: " + getId () +
348- ",\n world: " + (world == null ? "" : world .getName ()) +
349- ",\n x: " + getCenterX () +
350- ",\n z: " + getCenterZ () +
351- ",\n renderers:" + renderers
352- ;
348+ FormatString string = new FormatString (new StringBuilder ("{" ));
349+
350+ string .appendFieldRecursive ("id" , getId (), 1 );
351+ string .appendFieldRecursive ("world" , (world == null ? "" : world .getName ()), 1 );
352+ string .appendFieldRecursive ("x" , getCenterX (), 1 );
353+ string .appendFieldRecursive ("z" , getCenterZ (), 1 );
354+ string .appendFieldRecursive ("renderers" , renderers , 1 );
355+
356+ return string .finalizeString () + "" ;
353357 }
354358
355359}
You can’t perform that action at this time.
0 commit comments