From 55b6f675505eb05508e026dff338c1d7439e15a9 Mon Sep 17 00:00:00 2001 From: HexelDev Date: Thu, 15 Mar 2018 20:20:40 +0100 Subject: [PATCH] JavaDocs --- .../data/QuickCommandsProtectionManager.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/fr/xephi/authme/data/QuickCommandsProtectionManager.java b/src/main/java/fr/xephi/authme/data/QuickCommandsProtectionManager.java index 692c1dbc..6e697db1 100644 --- a/src/main/java/fr/xephi/authme/data/QuickCommandsProtectionManager.java +++ b/src/main/java/fr/xephi/authme/data/QuickCommandsProtectionManager.java @@ -26,14 +26,28 @@ public class QuickCommandsProtectionManager implements SettingsDependent, HasCle reload(settings); } + /** + * Save the player in the set + * @param name the player's name + */ public void setLogin(String name) { latestLogin.add(name); } + /** + * Returns whether the given player has the permission and should be saved in the set + * @param player the player to check + * @return true if the player has the permission, false otherwise + */ public boolean shouldSaveLogin(Player player) { return permissionsManager.hasPermission(player, PlayerPermission.QUICK_COMMANDS_PROTECTION); } + /** + * Returns whether the given player is able to perform the command + * @param name the name of the player to check + * @return true if the player is not in the set (so it's allowed to perform the command), false otherwise + */ public boolean isAllowed(String name) { return !latestLogin.contains(name); }