Fix javadoc

This commit is contained in:
Eric 2020-03-21 15:37:19 +01:00
parent 0fe6583485
commit 1923c457a4
7 changed files with 20 additions and 10 deletions

View File

@ -3,7 +3,6 @@ package de.epiceric.shopchest.api;
import java.util.Collection; import java.util.Collection;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
@ -80,7 +79,7 @@ public interface ShopManager {
* @param sellPrice the price a player can sell the product for. * @param sellPrice the price a player can sell the product for.
* @return a completable future returning the new shop * @return a completable future returning the new shop
* @since 1.13 * @since 1.13
* @see ShopManager#addAdminShop(ShopProduct, Location, double, double, Consumer, Consumer) * @see ShopManager#addAdminShop(ShopProduct, Location, double, double)
*/ */
CompletableFuture<Shop> addShop(OfflinePlayer vendor, ShopProduct product, Location location, double buyPrice, double sellPrice); CompletableFuture<Shop> addShop(OfflinePlayer vendor, ShopProduct product, Location location, double buyPrice, double sellPrice);
@ -98,7 +97,7 @@ public interface ShopManager {
* @param sellPrice the price a player can sell the product for. * @param sellPrice the price a player can sell the product for.
* @return a completable future returning the new shop * @return a completable future returning the new shop
* @since 1.13 * @since 1.13
* @see ShopManager#addShop(OfflinePlayer, ShopProduct, Location, double, double, Consumer, Consumer) * @see ShopManager#addShop(OfflinePlayer, ShopProduct, Location, double, double)
*/ */
CompletableFuture<Shop> addAdminShop(ShopProduct product, Location location, double buyPrice, double sellPrice); CompletableFuture<Shop> addAdminShop(ShopProduct product, Location location, double buyPrice, double sellPrice);

View File

@ -140,7 +140,7 @@ public class ShopSelectItemEvent extends Event implements Cancellable {
* Gets either the shop type of the shop being created, or whether the shop * Gets either the shop type of the shop being created, or whether the shop
* is being edited * is being edited
* *
* @return the shop type or {@link Type#EDIT} * @return the shop type or {@link SelectFlag.Type#EDIT}
*/ */
public SelectFlag.Type getType() { public SelectFlag.Type getType() {
return type; return type;

View File

@ -1,7 +1,6 @@
package de.epiceric.shopchest.api.shop; package de.epiceric.shopchest.api.shop;
import java.util.Optional; import java.util.Optional;
import java.util.function.Consumer;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
@ -15,8 +14,8 @@ import de.epiceric.shopchest.api.exceptions.ChestNotFoundException;
* Represents a shop * Represents a shop
* *
* @since 1.13 * @since 1.13
* @see ShopManager#addShop(OfflinePlayer, ShopProduct, Location, double, double, Consumer, Consumer) * @see ShopManager#addShop(OfflinePlayer, ShopProduct, Location, double, double)
* @see ShopManager#addAdminShop(ShopProduct, Location, double, double, Consumer, Consumer) * @see ShopManager#addAdminShop(ShopProduct, Location, double, double)
*/ */
public interface Shop { public interface Shop {

View File

@ -799,6 +799,8 @@ public abstract class Database {
/** /**
* Gets whether the database has been fully initialized * Gets whether the database has been fully initialized
*
* @return whether the database is initialized
*/ */
public boolean isInitialized() { public boolean isInitialized() {
return initialized; return initialized;

View File

@ -145,7 +145,7 @@ public class ShopImpl implements Shop {
* To update the shop in the database, it is necessary to update the shop in the database. * To update the shop in the database, it is necessary to update the shop in the database.
* *
* @param product the product * @param product the product
* @see Database#updateShop(Shop, Runnable, java.util.function.Consumer) * @see Database#updateShop(Shop)
*/ */
public void setProduct(ShopProduct product) { public void setProduct(ShopProduct product) {
this.product = product; this.product = product;
@ -189,7 +189,7 @@ public class ShopImpl implements Shop {
* *
* @param buyPrice the buy price * @param buyPrice the buy price
* @throws IllegalStateException when a player can neither buy nor sell from this shop * @throws IllegalStateException when a player can neither buy nor sell from this shop
* @see Database#updateShop(Shop, Runnable, java.util.function.Consumer) * @see Database#updateShop(Shop)
* @since 1.13 * @since 1.13
*/ */
public void setBuyPrice(double buyPrice) { public void setBuyPrice(double buyPrice) {
@ -213,7 +213,7 @@ public class ShopImpl implements Shop {
* *
* @param sellPrice the sell price * @param sellPrice the sell price
* @throws IllegalStateException when a player can neither buy nor sell from this shop * @throws IllegalStateException when a player can neither buy nor sell from this shop
* @see Database#updateShop(Shop, Runnable, java.util.function.Consumer) * @see Database#updateShop(Shop)
* @since 1.13 * @since 1.13
*/ */
public void setSellPrice(double sellPrice) { public void setSellPrice(double sellPrice) {

View File

@ -23,6 +23,8 @@ public final class Counter {
/** /**
* Increments the counter by one and returns itself * Increments the counter by one and returns itself
*
* @return this counter
*/ */
public final Counter increment() { public final Counter increment() {
this.value++; this.value++;
@ -31,6 +33,8 @@ public final class Counter {
/** /**
* Decrements the counter by one if its value is greater than zero and returns itself * Decrements the counter by one if its value is greater than zero and returns itself
*
* @return this counter
*/ */
public final Counter decrement() { public final Counter decrement() {
this.value = Math.max(0, this.value - 1); this.value = Math.max(0, this.value - 1);
@ -39,7 +43,9 @@ public final class Counter {
/** /**
* Sets the counter's value to the given value or zero if the given value is negative * Sets the counter's value to the given value or zero if the given value is negative
*
* @param value the value to set the counter to * @param value the value to set the counter to
* @return this counter
*/ */
public final Counter set(int value) { public final Counter set(int value) {
this.value = Math.max(0, value); this.value = Math.max(0, value);
@ -48,6 +54,8 @@ public final class Counter {
/** /**
* Returns the current value * Returns the current value
*
* @return the current value
*/ */
public final int get() { public final int get() {
return value; return value;

View File

@ -38,6 +38,8 @@ public class NmsUtil {
* Gets the major version of the server * Gets the major version of the server
* <p> * <p>
* (e.g. 9 for v1_9_R2, 10 for v1_10_R1) * (e.g. 9 for v1_9_R2, 10 for v1_10_R1)
*
* @return the major version
*/ */
public static int getMajorVersion() { public static int getMajorVersion() {
return Integer.parseInt(getServerVersion().split("_")[1]); return Integer.parseInt(getServerVersion().split("_")[1]);