From 9bd68b045ff607a44265f2a901e18a45eb5ce1e2 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Thu, 25 Feb 2021 19:46:16 +0100 Subject: [PATCH] Add javadoc --- .../Minepacks/Bukkit/API/MinepacksPlayer.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Minepacks-API/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlayer.java b/Minepacks-API/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlayer.java index 91e5e61..c3f54b4 100644 --- a/Minepacks-API/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlayer.java +++ b/Minepacks-API/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlayer.java @@ -102,7 +102,6 @@ public interface MinepacksPlayer */ @Nullable Backpack getBackpack(); - /** * Checks whether the player has been loaded. * While the player is not loaded data might not be available or valid. @@ -111,6 +110,12 @@ public interface MinepacksPlayer */ boolean isLoaded(); + /** + * If the player is loaded the callback will be called instantly. + * If the player is not loaded the callback will be called as soon as it is loaded. + * + * @param callback Callback that should be called once the player is loaded. + */ void notifyOnLoad(Callback callback); /** @@ -122,9 +127,26 @@ public interface MinepacksPlayer */ boolean isBackpackLoaded(); + /** + * Gets the backpack of the player. + * If the backpack is loaded the callback will be executed instantly. + * If the backpack is not yet loaded the callback will be called once it is loaded. + * + * @param callback The callback that should be called once the backpack is loaded. + */ void getBackpack(Callback callback); + /** + * Sets the command cooldown time for the player. + * + * @param cooldown The cooldown timestamp for the command. Unix time in milliseconds. + */ void setCooldown(long cooldown); + /** + * Gets the command cooldown time for the player. + * + * @return The cooldown timestamp for the command. Unix time in milliseconds. + */ long getCooldown(); } \ No newline at end of file