From 4a84f62372b18a42436afa944ae175c319a96405 Mon Sep 17 00:00:00 2001
From: "Blue (Lukas Rieger)"
Date: Mon, 20 Apr 2020 20:04:36 +0200
Subject: [PATCH] Fix some incorrect javadoc
---
.gitignore | 4 ++++
.../java/de/bluecolored/bluemap/api/BlueMapAPI.java | 8 +++++++-
.../bluecolored/bluemap/api/BlueMapAPIListener.java | 6 +++---
.../java/de/bluecolored/bluemap/api/BlueMapMap.java | 10 ++++++++++
.../de/bluecolored/bluemap/api/BlueMapWorld.java | 13 +++++++------
.../bluecolored/bluemap/api/marker/ShapeMarker.java | 4 ++--
.../bluecolored/bluemap/api/renderer/RenderAPI.java | 2 --
7 files changed, 33 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore
index 188cee5..1af1d45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,10 @@ bin/
bin/*
*/bin/*
+doc/
+doc/*
+*/doc/*
+
.classpath
*/.classpath
diff --git a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java
index d55a1b4..dd9c8e7 100644
--- a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java
+++ b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java
@@ -55,6 +55,7 @@ public abstract class BlueMapAPI {
* Getter for the {@link MarkerAPI}.
* 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}
+ * @throws IOException if there was an IOException loading the marker.json
*/
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.
- * @param instance {@link BlueMapAPI}-instance
+ * @param instance the {@link BlueMapAPI}-instance
+ * @return true
if the instance has been registered, false
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 {
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.
+ * @param instance the {@link BlueMapAPI} instance
+ * @return true
if the instance was unregistered, false
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 {
if (BlueMapAPI.instance != instance) return false;
diff --git a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPIListener.java b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPIListener.java
index eab99cb..9e9f074 100644
--- a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPIListener.java
+++ b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPIListener.java
@@ -29,7 +29,7 @@ public interface BlueMapAPIListener {
/**
* Called when BlueMap has been loaded and started and the API is ready to use.
* If {@link BlueMapAPI} is already enabled when this listener is registered this method will be called immediately (on the same thread)!
- * (Note: This method will likely be called asynchronously, not on the server-thread!
+ *
(Note: This method will likely be called asynchronously, not on the server-thread!
* @param blueMapApi the {@link BlueMapAPI}
*/
default void onEnable(BlueMapAPI blueMapApi) {}
@@ -37,8 +37,8 @@ public interface BlueMapAPIListener {
/**
* Called before BlueMap is being unloaded and stopped, after this method returns the API is no longer usable!
* Unlike {@link BlueMapAPIListener#onEnable(BlueMapAPI)}, if {@link BlueMapAPI} is not enabled when this listener is registered this method will not be called immediately.
- * (Note: This method will likely be called asynchronously, not on the server-thread!
- * @param blueMapApi
+ *
(Note: This method will likely be called asynchronously, not on the server-thread!
+ * @param blueMapApi the {@link BlueMapAPI}
*/
default void onDisable(BlueMapAPI blueMapApi) {}
diff --git a/src/main/java/de/bluecolored/bluemap/api/BlueMapMap.java b/src/main/java/de/bluecolored/bluemap/api/BlueMapMap.java
index c9ad94a..39a9bb1 100644
--- a/src/main/java/de/bluecolored/bluemap/api/BlueMapMap.java
+++ b/src/main/java/de/bluecolored/bluemap/api/BlueMapMap.java
@@ -67,6 +67,10 @@ public interface BlueMapMap {
/**
* 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){
Vector2i offset = getTileOffset();
@@ -80,6 +84,9 @@ public interface BlueMapMap {
/**
* 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){
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
+ *
+ * @param pos the position of the block
+ * @return the tile position
*/
default Vector2i posToTile(Vector3d pos){
return posToTile(pos.getX(), pos.getZ());
diff --git a/src/main/java/de/bluecolored/bluemap/api/BlueMapWorld.java b/src/main/java/de/bluecolored/bluemap/api/BlueMapWorld.java
index a84fb89..59d0a8b 100644
--- a/src/main/java/de/bluecolored/bluemap/api/BlueMapWorld.java
+++ b/src/main/java/de/bluecolored/bluemap/api/BlueMapWorld.java
@@ -41,13 +41,14 @@ public interface BlueMapWorld {
*
* Implementation notes:
* The used UUID highly depends on the implementation
- *
- * Sponge | The UUID is equal to the returned UUID by world-instances of the Sponge-API, so you can just use spongeWorld.getUniqueId() | |
---|
- *
Bukkit | The UUID is equal to the returned UUID by world-instances of the Bukkit-API, so you can just use bukkitWorld.getUID() | |
---|
- *
Forge | The UUID is randomly generated, and changes on each reload/restart | |
---|
- *
CLI | The UUID is randomly generated, and changes on each reload/restart | |
---|
- *
*
+ *
+ * Implementations
+ * Sponge | The UUID is equal to the returned UUID by world-instances of the Sponge-API, so you can just use spongeWorld.getUniqueId() |
+ * Bukkit | The UUID is equal to the returned UUID by world-instances of the Bukkit-API, so you can just use bukkitWorld.getUID() |
+ * Forge | The UUID is randomly generated, and changes on each reload/restart |
+ * CLI | The UUID is randomly generated, and changes on each reload/restart |
+ *
*
* @return the {@link UUID} of the world
*/
diff --git a/src/main/java/de/bluecolored/bluemap/api/marker/ShapeMarker.java b/src/main/java/de/bluecolored/bluemap/api/marker/ShapeMarker.java
index dbe1b61..30887e2 100644
--- a/src/main/java/de/bluecolored/bluemap/api/marker/ShapeMarker.java
+++ b/src/main/java/de/bluecolored/bluemap/api/marker/ShapeMarker.java
@@ -75,8 +75,8 @@ public interface ShapeMarker extends Marker {
/**
* Sets the border- and fill- color.
- * @param borderColor
- * @param fillColor
+ * @param borderColor the new border-color
+ * @param fillColor the new fill-color
* @see #setBorderColor(Color)
* @see #setFillColor(Color)
*/
diff --git a/src/main/java/de/bluecolored/bluemap/api/renderer/RenderAPI.java b/src/main/java/de/bluecolored/bluemap/api/renderer/RenderAPI.java
index 0dbd882..1be9750 100644
--- a/src/main/java/de/bluecolored/bluemap/api/renderer/RenderAPI.java
+++ b/src/main/java/de/bluecolored/bluemap/api/renderer/RenderAPI.java
@@ -68,8 +68,6 @@ public interface RenderAPI {
* @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)
*
- * @return the scheduled {@link RenderTicket}
- *
* @throws IllegalArgumentException if there is no map loaded with the provided mapId
*/
void render(String mapId, Vector3i blockPosition);