Fix some incorrect javadoc

This commit is contained in:
Blue (Lukas Rieger) 2020-04-20 20:04:36 +02:00
parent ead819422f
commit 4a84f62372
7 changed files with 33 additions and 14 deletions

4
.gitignore vendored
View File

@ -14,6 +14,10 @@ bin/
bin/* bin/*
*/bin/* */bin/*
doc/
doc/*
*/doc/*
.classpath .classpath
*/.classpath */.classpath

View File

@ -55,6 +55,7 @@ public abstract class BlueMapAPI {
* Getter for the {@link MarkerAPI}.<br> * Getter for the {@link MarkerAPI}.<br>
* Calling this gives you a fresh loaded {@link MarkerAPI}, so you don't have to call {@link MarkerAPI#load()} right away! * Calling this gives you a fresh loaded {@link MarkerAPI}, so you don't have to call {@link MarkerAPI#load()} right away!
* @return the {@link MarkerAPI} * @return the {@link MarkerAPI}
* @throws IOException if there was an IOException loading the marker.json
*/ */
public abstract MarkerAPI getMarkerAPI() throws IOException; public abstract MarkerAPI getMarkerAPI() throws IOException;
@ -138,7 +139,9 @@ public abstract class BlueMapAPI {
/** /**
* Used by BlueMap to register the API and call the listeners properly. * Used by BlueMap to register the API and call the listeners properly.
* @param instance {@link BlueMapAPI}-instance * @param instance the {@link BlueMapAPI}-instance
* @return <code>true</code> if the instance has been registered, <code>false</code> if there already was an instance registered
* @throws ExecutionException if a {@link BlueMapAPIListener} threw an exception during the registration
*/ */
protected static synchronized boolean registerInstance(BlueMapAPI instance) throws ExecutionException { protected static synchronized boolean registerInstance(BlueMapAPI instance) throws ExecutionException {
if (BlueMapAPI.instance != null) return false; if (BlueMapAPI.instance != null) return false;
@ -167,6 +170,9 @@ public abstract class BlueMapAPI {
/** /**
* Used by BlueMap to unregister the API and call the listeners properly. * Used by BlueMap to unregister the API and call the listeners properly.
* @param instance the {@link BlueMapAPI} instance
* @return <code>true</code> if the instance was unregistered, <code>false</code> if there was no or an other instance registered
* @throws ExecutionException if a {@link BlueMapAPIListener} threw an exception during the un-registration
*/ */
protected static synchronized boolean unregisterInstance(BlueMapAPI instance) throws ExecutionException { protected static synchronized boolean unregisterInstance(BlueMapAPI instance) throws ExecutionException {
if (BlueMapAPI.instance != instance) return false; if (BlueMapAPI.instance != instance) return false;

View File

@ -29,7 +29,7 @@ public interface BlueMapAPIListener {
/** /**
* Called when BlueMap has been loaded and started and the API is ready to use.<br> * Called when BlueMap has been loaded and started and the API is ready to use.<br>
* If {@link BlueMapAPI} is already enabled when this listener is registered this method will be called immediately <i>(on the same thread)</i>! * If {@link BlueMapAPI} is already enabled when this listener is registered this method will be called immediately <i>(on the same thread)</i>!
* <p><i>(Note: This method will likely be called asynchronously, <b>not</b> on the server-thread!</i><p> * <p><i>(Note: This method will likely be called asynchronously, <b>not</b> on the server-thread!</i></p>
* @param blueMapApi the {@link BlueMapAPI} * @param blueMapApi the {@link BlueMapAPI}
*/ */
default void onEnable(BlueMapAPI blueMapApi) {} default void onEnable(BlueMapAPI blueMapApi) {}
@ -37,8 +37,8 @@ public interface BlueMapAPIListener {
/** /**
* Called <b>before</b> BlueMap is being unloaded and stopped, after this method returns the API is no longer usable!<br> * Called <b>before</b> BlueMap is being unloaded and stopped, after this method returns the API is no longer usable!<br>
* 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. * 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.
* <p><i>(Note: This method will likely be called asynchronously, <b>not</b> on the server-thread!</i><p> * <p><i>(Note: This method will likely be called asynchronously, <b>not</b> on the server-thread!</i></p>
* @param blueMapApi * @param blueMapApi the {@link BlueMapAPI}
*/ */
default void onDisable(BlueMapAPI blueMapApi) {} default void onDisable(BlueMapAPI blueMapApi) {}

View File

@ -67,6 +67,10 @@ public interface BlueMapMap {
/** /**
* Converts a block-position to a map-tile-coordinate for this map * Converts a block-position to a map-tile-coordinate for this map
*
* @param blockX the x-position of the block
* @param blockZ the z-position of the block
* @return the tile position
*/ */
default Vector2i posToTile(double blockX, double blockZ){ default Vector2i posToTile(double blockX, double blockZ){
Vector2i offset = getTileOffset(); Vector2i offset = getTileOffset();
@ -80,6 +84,9 @@ public interface BlueMapMap {
/** /**
* Converts a block-position to a map-tile-coordinate for this map * Converts a block-position to a map-tile-coordinate for this map
*
* @param pos the position of the block
* @return the tile position
*/ */
default Vector2i posToTile(Vector3i pos){ default Vector2i posToTile(Vector3i pos){
return posToTile(pos.getX(), pos.getZ()); return posToTile(pos.getX(), pos.getZ());
@ -87,6 +94,9 @@ public interface BlueMapMap {
/** /**
* Converts a block-position to a map-tile-coordinate for this map * Converts a block-position to a map-tile-coordinate for this map
*
* @param pos the position of the block
* @return the tile position
*/ */
default Vector2i posToTile(Vector3d pos){ default Vector2i posToTile(Vector3d pos){
return posToTile(pos.getX(), pos.getZ()); return posToTile(pos.getX(), pos.getZ());

View File

@ -41,13 +41,14 @@ public interface BlueMapWorld {
* <p> * <p>
* <b>Implementation notes:</b><br> * <b>Implementation notes:</b><br>
* The used UUID highly depends on the implementation * The used UUID highly depends on the implementation
* <table>
* <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>
* <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>
* <tr><th>Forge</th><td>The UUID is randomly generated, and changes on each reload/restart</code><td><tr>
* <tr><th>CLI</th><td>The UUID is randomly generated, and changes on each reload/restart</code><td><tr>
* </table>
* </p> * </p>
* <table>
* <caption>Implementations</caption>
* <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>
* <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>
* <tr><th>Forge</th><td>The UUID is randomly generated, and changes on each reload/restart</td></tr>
* <tr><th>CLI</th><td>The UUID is randomly generated, and changes on each reload/restart</td></tr>
* </table>
* *
* @return the {@link UUID} of the world * @return the {@link UUID} of the world
*/ */

View File

@ -75,8 +75,8 @@ public interface ShapeMarker extends Marker {
/** /**
* Sets the border- and fill- color. * Sets the border- and fill- color.
* @param borderColor * @param borderColor the new border-color
* @param fillColor * @param fillColor the new fill-color
* @see #setBorderColor(Color) * @see #setBorderColor(Color)
* @see #setFillColor(Color) * @see #setFillColor(Color)
*/ */

View File

@ -68,8 +68,6 @@ public interface RenderAPI {
* @param mapId the id of the {@link BlueMapMap} to render * @param mapId the id of the {@link BlueMapMap} to render
* @param blockPosition a {@link Vector3i} for the block-position to render (the whole map-tile will be rendered not only that block) * @param blockPosition a {@link Vector3i} for the block-position to render (the whole map-tile will be rendered not only that block)
* *
* @return the scheduled {@link RenderTicket}
*
* @throws IllegalArgumentException if there is no map loaded with the provided mapId * @throws IllegalArgumentException if there is no map loaded with the provided mapId
*/ */
void render(String mapId, Vector3i blockPosition); void render(String mapId, Vector3i blockPosition);