mirror of
https://github.com/EpicEricEE/ShopChest.git
synced 2024-11-25 03:55:22 +01:00
Fix javadoc
This commit is contained in:
parent
0fe6583485
commit
1923c457a4
@ -3,7 +3,6 @@ package de.epiceric.shopchest.api;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
@ -80,7 +79,7 @@ public interface ShopManager {
|
||||
* @param sellPrice the price a player can sell the product for.
|
||||
* @return a completable future returning the new shop
|
||||
* @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);
|
||||
|
||||
@ -98,7 +97,7 @@ public interface ShopManager {
|
||||
* @param sellPrice the price a player can sell the product for.
|
||||
* @return a completable future returning the new shop
|
||||
* @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);
|
||||
|
||||
|
@ -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
|
||||
* is being edited
|
||||
*
|
||||
* @return the shop type or {@link Type#EDIT}
|
||||
* @return the shop type or {@link SelectFlag.Type#EDIT}
|
||||
*/
|
||||
public SelectFlag.Type getType() {
|
||||
return type;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package de.epiceric.shopchest.api.shop;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
@ -15,8 +14,8 @@ import de.epiceric.shopchest.api.exceptions.ChestNotFoundException;
|
||||
* Represents a shop
|
||||
*
|
||||
* @since 1.13
|
||||
* @see ShopManager#addShop(OfflinePlayer, ShopProduct, Location, double, double, Consumer, Consumer)
|
||||
* @see ShopManager#addAdminShop(ShopProduct, Location, double, double, Consumer, Consumer)
|
||||
* @see ShopManager#addShop(OfflinePlayer, ShopProduct, Location, double, double)
|
||||
* @see ShopManager#addAdminShop(ShopProduct, Location, double, double)
|
||||
*/
|
||||
public interface Shop {
|
||||
|
||||
|
@ -799,6 +799,8 @@ public abstract class Database {
|
||||
|
||||
/**
|
||||
* Gets whether the database has been fully initialized
|
||||
*
|
||||
* @return whether the database is initialized
|
||||
*/
|
||||
public boolean isInitialized() {
|
||||
return initialized;
|
||||
|
@ -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.
|
||||
*
|
||||
* @param product the product
|
||||
* @see Database#updateShop(Shop, Runnable, java.util.function.Consumer)
|
||||
* @see Database#updateShop(Shop)
|
||||
*/
|
||||
public void setProduct(ShopProduct product) {
|
||||
this.product = product;
|
||||
@ -189,7 +189,7 @@ public class ShopImpl implements Shop {
|
||||
*
|
||||
* @param buyPrice the buy price
|
||||
* @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
|
||||
*/
|
||||
public void setBuyPrice(double buyPrice) {
|
||||
@ -213,7 +213,7 @@ public class ShopImpl implements Shop {
|
||||
*
|
||||
* @param sellPrice the sell price
|
||||
* @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
|
||||
*/
|
||||
public void setSellPrice(double sellPrice) {
|
||||
|
@ -23,6 +23,8 @@ public final class Counter {
|
||||
|
||||
/**
|
||||
* Increments the counter by one and returns itself
|
||||
*
|
||||
* @return this counter
|
||||
*/
|
||||
public final Counter increment() {
|
||||
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
|
||||
*
|
||||
* @return this counter
|
||||
*/
|
||||
public final Counter decrement() {
|
||||
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
|
||||
*
|
||||
* @param value the value to set the counter to
|
||||
* @return this counter
|
||||
*/
|
||||
public final Counter set(int value) {
|
||||
this.value = Math.max(0, value);
|
||||
@ -48,6 +54,8 @@ public final class Counter {
|
||||
|
||||
/**
|
||||
* Returns the current value
|
||||
*
|
||||
* @return the current value
|
||||
*/
|
||||
public final int get() {
|
||||
return value;
|
||||
|
@ -38,6 +38,8 @@ public class NmsUtil {
|
||||
* Gets the major version of the server
|
||||
* <p>
|
||||
* (e.g. 9 for v1_9_R2, 10 for v1_10_R1)
|
||||
*
|
||||
* @return the major version
|
||||
*/
|
||||
public static int getMajorVersion() {
|
||||
return Integer.parseInt(getServerVersion().split("_")[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user