Skip to content

Commit 3bed723

Browse files
committed
Apply spotless fixes
1 parent adcce97 commit 3bed723

18 files changed

+1592
-1592
lines changed

src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java

Lines changed: 245 additions & 245 deletions
Large diffs are not rendered by default.

src/main/java/de/bluecolored/bluemap/api/BlueMapAPIListener.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@
3333
@Deprecated
3434
public interface BlueMapAPIListener {
3535

36-
/**
37-
* Called when BlueMap has been loaded and started and the API is ready to use.<br>
38-
* If {@link BlueMapAPI} is already enabled when this listener is registered this method will be called immediately <i>(on the same thread)</i>!
39-
* <p><i>(Note: This method will likely be called asynchronously, <b>not</b> on the server-thread!</i></p>
40-
* @param blueMapApi the {@link BlueMapAPI}
41-
*/
42-
default void onEnable(BlueMapAPI blueMapApi) {}
43-
44-
/**
45-
* Called <b>before</b> BlueMap is being unloaded and stopped, after this method returns the API is no longer usable!<br>
46-
* Unlike {@link BlueMapAPIListener#onEnable(BlueMapAPI)}, if {@link BlueMapAPI} is not enabled when this listener is registered this method will <b>not</b> be called immediately.
47-
* <p><i>(Note: This method will likely be called asynchronously, <b>not</b> on the server-thread!</i></p>
48-
* @param blueMapApi the {@link BlueMapAPI}
49-
*/
50-
default void onDisable(BlueMapAPI blueMapApi) {}
51-
36+
/**
37+
* Called when BlueMap has been loaded and started and the API is ready to use.<br>
38+
* If {@link BlueMapAPI} is already enabled when this listener is registered this method will be called immediately <i>(on the same thread)</i>!
39+
* <p><i>(Note: This method will likely be called asynchronously, <b>not</b> on the server-thread!</i></p>
40+
* @param blueMapApi the {@link BlueMapAPI}
41+
*/
42+
default void onEnable(BlueMapAPI blueMapApi) {}
43+
44+
/**
45+
* Called <b>before</b> BlueMap is being unloaded and stopped, after this method returns the API is no longer usable!<br>
46+
* Unlike {@link BlueMapAPIListener#onEnable(BlueMapAPI)}, if {@link BlueMapAPI} is not enabled when this listener is registered this method will <b>not</b> be called immediately.
47+
* <p><i>(Note: This method will likely be called asynchronously, <b>not</b> on the server-thread!</i></p>
48+
* @param blueMapApi the {@link BlueMapAPI}
49+
*/
50+
default void onDisable(BlueMapAPI blueMapApi) {}
51+
5252
}

src/main/java/de/bluecolored/bluemap/api/BlueMapMap.java

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -37,99 +37,99 @@
3737
*/
3838
public interface BlueMapMap {
3939

40-
/**
41-
* Returns this maps id, this is equal to the id configured in bluemap's config for this map.
42-
* @return the id of this map
43-
*/
44-
String getId();
45-
46-
/**
47-
* Returns this maps display-name, this is equal to the name configured in bluemap's config for this map.
48-
* @return the name of this map
49-
*/
50-
String getName();
51-
52-
/**
53-
* Getter for the {@link BlueMapWorld} of this map.
54-
* @return the {@link BlueMapWorld} of this map
55-
*/
56-
BlueMapWorld getWorld();
57-
58-
/**
59-
* Getter for the size of all tiles on this map in blocks.
60-
* @return the tile-size in blocks
61-
*/
62-
Vector2i getTileSize();
63-
64-
/**
65-
* Getter for the offset of the tile-grid on this map.<br>
66-
* E.g. an offset of (2|-1) would mean that the tile (0|0) has block (2|0|-1) at it's min-corner.
67-
* @return the tile-offset in blocks
68-
*/
69-
Vector2i getTileOffset();
70-
71-
/**
72-
* <p>Sets a filter that determines if a specific (hires) tile of this map should be updated or not.
73-
* If this filter returns false for a tile, the "render"-process of this tile will be cancelled and the tile will be left untouched.</p>
74-
* <p><b>Warning:</b> Using this method will harm the integrity of the map! Since BlueMap will still assume that the tile got updated properly.</p>
75-
* <p>Any previously set filters will get overwritten with the new one. You can get the current filter using {@link #getTileFilter()} and combine them if you wish.</p>
76-
* @param filter The filter that will be used from now on.
77-
*/
78-
void setTileFilter(Predicate<Vector2i> filter);
79-
80-
/**
81-
* Freezes or unfreezes the map in the same way the `/bluemap freeze` command does.
82-
* BlueMap will no longer attempt to update this map if it is frozen.
83-
* @param frozen Whether the map will be frozen or not
84-
*/
85-
void setFrozen(boolean frozen);
86-
87-
/**
88-
* Checks if the map is currently frozen
89-
* @return true if the map is frozen, false otherwise
90-
*/
91-
boolean isFrozen();
92-
93-
/**
94-
* Returns the currently set TileFilter. The default TileFilter is equivalent to <code>t -> true</code>.
95-
*/
96-
Predicate<Vector2i> getTileFilter();
97-
98-
/**
99-
* Converts a block-position to a map-tile-coordinate for this map
100-
*
101-
* @param blockX the x-position of the block
102-
* @param blockZ the z-position of the block
103-
* @return the tile position
104-
*/
105-
default Vector2i posToTile(double blockX, double blockZ){
106-
Vector2i offset = getTileOffset();
107-
Vector2i size = getTileSize();
108-
109-
return Vector2i.from(
110-
(int) Math.floor((blockX - offset.getX()) / size.getX()),
111-
(int) Math.floor((blockZ - offset.getY()) / size.getY())
112-
);
113-
}
114-
115-
/**
116-
* Converts a block-position to a map-tile-coordinate for this map
117-
*
118-
* @param pos the position of the block
119-
* @return the tile position
120-
*/
121-
default Vector2i posToTile(Vector3i pos){
122-
return posToTile(pos.getX(), pos.getZ());
123-
}
124-
125-
/**
126-
* Converts a block-position to a map-tile-coordinate for this map
127-
*
128-
* @param pos the position of the block
129-
* @return the tile position
130-
*/
131-
default Vector2i posToTile(Vector3d pos){
132-
return posToTile(pos.getX(), pos.getZ());
133-
}
134-
40+
/**
41+
* Returns this maps id, this is equal to the id configured in bluemap's config for this map.
42+
* @return the id of this map
43+
*/
44+
String getId();
45+
46+
/**
47+
* Returns this maps display-name, this is equal to the name configured in bluemap's config for this map.
48+
* @return the name of this map
49+
*/
50+
String getName();
51+
52+
/**
53+
* Getter for the {@link BlueMapWorld} of this map.
54+
* @return the {@link BlueMapWorld} of this map
55+
*/
56+
BlueMapWorld getWorld();
57+
58+
/**
59+
* Getter for the size of all tiles on this map in blocks.
60+
* @return the tile-size in blocks
61+
*/
62+
Vector2i getTileSize();
63+
64+
/**
65+
* Getter for the offset of the tile-grid on this map.<br>
66+
* E.g. an offset of (2|-1) would mean that the tile (0|0) has block (2|0|-1) at it's min-corner.
67+
* @return the tile-offset in blocks
68+
*/
69+
Vector2i getTileOffset();
70+
71+
/**
72+
* <p>Sets a filter that determines if a specific (hires) tile of this map should be updated or not.
73+
* If this filter returns false for a tile, the "render"-process of this tile will be cancelled and the tile will be left untouched.</p>
74+
* <p><b>Warning:</b> Using this method will harm the integrity of the map! Since BlueMap will still assume that the tile got updated properly.</p>
75+
* <p>Any previously set filters will get overwritten with the new one. You can get the current filter using {@link #getTileFilter()} and combine them if you wish.</p>
76+
* @param filter The filter that will be used from now on.
77+
*/
78+
void setTileFilter(Predicate<Vector2i> filter);
79+
80+
/**
81+
* Freezes or unfreezes the map in the same way the `/bluemap freeze` command does.
82+
* BlueMap will no longer attempt to update this map if it is frozen.
83+
* @param frozen Whether the map will be frozen or not
84+
*/
85+
void setFrozen(boolean frozen);
86+
87+
/**
88+
* Checks if the map is currently frozen
89+
* @return true if the map is frozen, false otherwise
90+
*/
91+
boolean isFrozen();
92+
93+
/**
94+
* Returns the currently set TileFilter. The default TileFilter is equivalent to <code>t -> true</code>.
95+
*/
96+
Predicate<Vector2i> getTileFilter();
97+
98+
/**
99+
* Converts a block-position to a map-tile-coordinate for this map
100+
*
101+
* @param blockX the x-position of the block
102+
* @param blockZ the z-position of the block
103+
* @return the tile position
104+
*/
105+
default Vector2i posToTile(double blockX, double blockZ){
106+
Vector2i offset = getTileOffset();
107+
Vector2i size = getTileSize();
108+
109+
return Vector2i.from(
110+
(int) Math.floor((blockX - offset.getX()) / size.getX()),
111+
(int) Math.floor((blockZ - offset.getY()) / size.getY())
112+
);
113+
}
114+
115+
/**
116+
* Converts a block-position to a map-tile-coordinate for this map
117+
*
118+
* @param pos the position of the block
119+
* @return the tile position
120+
*/
121+
default Vector2i posToTile(Vector3i pos){
122+
return posToTile(pos.getX(), pos.getZ());
123+
}
124+
125+
/**
126+
* Converts a block-position to a map-tile-coordinate for this map
127+
*
128+
* @param pos the position of the block
129+
* @return the tile position
130+
*/
131+
default Vector2i posToTile(Vector3d pos){
132+
return posToTile(pos.getX(), pos.getZ());
133+
}
134+
135135
}

src/main/java/de/bluecolored/bluemap/api/BlueMapWorld.java

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,37 @@
3333
*/
3434
public interface BlueMapWorld {
3535

36-
/**
37-
* <p>Getter for the {@link UUID} of the world.</p>
38-
* <p>
39-
* The {@link UUID}s of this worlds are <b>not</b> guaranteed to be consistent across reloads/restarts!
40-
* </p>
41-
* <p>
42-
* <b>Implementation notes:</b><br>
43-
* The used UUID highly depends on the implementation
44-
* </p>
45-
* <table>
46-
* <caption>Implementations</caption>
47-
* <tr><th>Sponge</th><td>The UUID is equal to the returned UUID by world-instances of the Sponge-API, so you can just use <code>spongeWorld.getUniqueId()</code></td></tr>
48-
* <tr><th>Bukkit</th><td>The UUID is equal to the returned UUID by world-instances of the Bukkit-API, so you can just use <code>bukkitWorld.getUID()</code></td></tr>
49-
* <tr><th>Forge</th><td>The UUID is randomly generated, and changes on each reload/restart</td></tr>
50-
* <tr><th>CLI</th><td>The UUID is randomly generated, and changes on each reload/restart</td></tr>
51-
* </table>
52-
*
53-
* @return the {@link UUID} of the world
54-
*/
55-
UUID getUuid();
56-
57-
/**
58-
* Getter for the {@link Path} of this world's save-files (folder). This matches the folder configured in bluemap's config for this map ( <code>world:</code> ).
59-
* @return the save-folder of this world.
60-
*/
61-
Path getSaveFolder();
62-
63-
/**
64-
* Getter for all {@link BlueMapMap}s for this world
65-
* @return an unmodifiable {@link Collection} of all {@link BlueMapMap}s for this world
66-
*/
67-
Collection<BlueMapMap> getMaps();
68-
36+
/**
37+
* <p>Getter for the {@link UUID} of the world.</p>
38+
* <p>
39+
* The {@link UUID}s of this worlds are <b>not</b> guaranteed to be consistent across reloads/restarts!
40+
* </p>
41+
* <p>
42+
* <b>Implementation notes:</b><br>
43+
* The used UUID highly depends on the implementation
44+
* </p>
45+
* <table>
46+
* <caption>Implementations</caption>
47+
* <tr><th>Sponge</th><td>The UUID is equal to the returned UUID by world-instances of the Sponge-API, so you can just use <code>spongeWorld.getUniqueId()</code></td></tr>
48+
* <tr><th>Bukkit</th><td>The UUID is equal to the returned UUID by world-instances of the Bukkit-API, so you can just use <code>bukkitWorld.getUID()</code></td></tr>
49+
* <tr><th>Forge</th><td>The UUID is randomly generated, and changes on each reload/restart</td></tr>
50+
* <tr><th>CLI</th><td>The UUID is randomly generated, and changes on each reload/restart</td></tr>
51+
* </table>
52+
*
53+
* @return the {@link UUID} of the world
54+
*/
55+
UUID getUuid();
56+
57+
/**
58+
* Getter for the {@link Path} of this world's save-files (folder). This matches the folder configured in bluemap's config for this map ( <code>world:</code> ).
59+
* @return the save-folder of this world.
60+
*/
61+
Path getSaveFolder();
62+
63+
/**
64+
* Getter for all {@link BlueMapMap}s for this world
65+
* @return an unmodifiable {@link Collection} of all {@link BlueMapMap}s for this world
66+
*/
67+
Collection<BlueMapMap> getMaps();
68+
6969
}

src/main/java/de/bluecolored/bluemap/api/marker/DistanceRangedMarker.java

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,36 @@
2626

2727
public interface DistanceRangedMarker extends Marker {
2828

29-
/**
30-
* Getter for the minimum distance of the camera to the position for this {@link Marker} to be displayed.<br>
31-
* If the camera is closer to this {@link Marker} than this distance, it will be hidden!
32-
*
33-
* @return the minimum distance for this {@link Marker} to be displayed
34-
*/
35-
double getMinDistance();
29+
/**
30+
* Getter for the minimum distance of the camera to the position for this {@link Marker} to be displayed.<br>
31+
* If the camera is closer to this {@link Marker} than this distance, it will be hidden!
32+
*
33+
* @return the minimum distance for this {@link Marker} to be displayed
34+
*/
35+
double getMinDistance();
3636

37-
/**
38-
* Sets the minimum distance of the camera to the position of the {@link Marker} for it to be displayed.<br>
39-
* If the camera is closer to this {@link Marker} than this distance, it will be hidden!
40-
*
41-
* @param minDistance the new minimum distance
42-
*/
43-
void setMinDistance(double minDistance);
37+
/**
38+
* Sets the minimum distance of the camera to the position of the {@link Marker} for it to be displayed.<br>
39+
* If the camera is closer to this {@link Marker} than this distance, it will be hidden!
40+
*
41+
* @param minDistance the new minimum distance
42+
*/
43+
void setMinDistance(double minDistance);
4444

45-
/**
46-
* Getter for the maximum distance of the camera to the position of the {@link Marker} for it to be displayed.<br>
47-
* If the camera is further to this {@link Marker} than this distance, it will be hidden!
48-
*
49-
* @return the maximum distance for this {@link Marker} to be displayed
50-
*/
51-
double getMaxDistance();
45+
/**
46+
* Getter for the maximum distance of the camera to the position of the {@link Marker} for it to be displayed.<br>
47+
* If the camera is further to this {@link Marker} than this distance, it will be hidden!
48+
*
49+
* @return the maximum distance for this {@link Marker} to be displayed
50+
*/
51+
double getMaxDistance();
5252

53-
/**
54-
* Sets the maximum distance of the camera to the position of the {@link Marker} for it to be displayed.<br>
55-
* If the camera is further to this {@link Marker} than this distance, it will be hidden!
56-
*
57-
* @param maxDistance the new maximum distance
58-
*/
59-
void setMaxDistance(double maxDistance);
53+
/**
54+
* Sets the maximum distance of the camera to the position of the {@link Marker} for it to be displayed.<br>
55+
* If the camera is further to this {@link Marker} than this distance, it will be hidden!
56+
*
57+
* @param maxDistance the new maximum distance
58+
*/
59+
void setMaxDistance(double maxDistance);
6060

6161
}

0 commit comments

Comments
 (0)