File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
src/main/java/io/github/communityradargg/forgemod/radarlistmanager Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,13 @@ public class RadarList {
4444 private final int version = 1 ;
4545 @ SerializedName ("namespace" )
4646 private final String namespace ;
47- @ SerializedName ("url" )
48- private final String url ;
4947 @ SerializedName ("playerMap" )
5048 private final Map <UUID , RadarListEntry > playerMap ;
5149 @ SerializedName ("visibility" )
5250 private final RadarListVisibility visibility ;
5351 @ SerializedName ("prefix" )
5452 private String prefix ;
53+ private transient String url ;
5554
5655 /**
5756 * Constructs a {@link RadarList}.
@@ -135,6 +134,15 @@ public void setPrefix(final @NotNull String prefix) {
135134 return url ;
136135 }
137136
137+ /**
138+ * Sets the url of the list.
139+ *
140+ * @param url The url to set.
141+ */
142+ public void setUrl (final @ NotNull String url ) {
143+ this .url = url ;
144+ }
145+
138146 /**
139147 * Gets the player map of the list.
140148 *
Original file line number Diff line number Diff line change @@ -274,6 +274,7 @@ public void loadPrivateLists() {
274274 private @ NotNull Optional <RadarList > loadRadarListFromFile (final @ NotNull String filePath ) {
275275 try (final FileReader reader = new FileReader (filePath )) {
276276 final RadarList list = gson .fromJson (reader , new TypeToken <RadarList >() {}.getType ());
277+ list .setUrl (filePath );
277278 if (list .validateList ()) {
278279 return Optional .of (list );
279280 }
You can’t perform that action at this time.
0 commit comments