@@ -101,6 +101,11 @@ public class CommandLoader {
101101
102102 private VotingPluginMain plugin ;
103103
104+ /**
105+ * Constructs a new CommandLoader.
106+ *
107+ * @param plugin the main plugin instance
108+ */
104109 public CommandLoader (VotingPluginMain plugin ) {
105110 this .plugin = plugin ;
106111 }
@@ -112,6 +117,12 @@ public String getAdminPerm() {
112117 return adminPerm ;
113118 }
114119
120+ /**
121+ * Gets the back button for inventory navigation.
122+ *
123+ * @param user the voting plugin user
124+ * @return the back button
125+ */
115126 public BInventoryButton getBackButton (VotingPluginUser user ) {
116127 ConfigurationSection sec = plugin .getGui ().getCHESTBackButton ();
117128 boolean a = false ;
@@ -181,6 +192,13 @@ public String getPlayerPerm() {
181192 return playerPerm ;
182193 }
183194
195+ /**
196+ * Checks if a player has permission for a command.
197+ *
198+ * @param player the player
199+ * @param cmd the command
200+ * @return true if player has permission
201+ */
184202 public boolean hasPermission (Player player , String cmd ) {
185203 if (cmd .startsWith ("votingplugin:" )) {
186204 cmd = cmd .substring ("votingplugin:" .length ());
@@ -230,6 +248,13 @@ public boolean hasPermission(Player player, String cmd) {
230248 return false ;
231249 }
232250
251+ /**
252+ * Checks if a command belongs to the VotingPlugin.
253+ *
254+ * @param player the player
255+ * @param cmd the command
256+ * @return true if it's a VotingPlugin command
257+ */
233258 public boolean isVotingPluginCommand (Player player , String cmd ) {
234259 if (plugin .getCommand (cmd ) != null || cmd .startsWith ("votingplugin" )) {
235260 return true ;
@@ -2321,6 +2346,11 @@ public void execute(CommandSender sender, String[] args) {
23212346
23222347 private final Set <String > aliasCommandNames = new HashSet <>();
23232348
2349+ /**
2350+ * Gets the set of alias command names.
2351+ *
2352+ * @return set of alias command names
2353+ */
23242354 public Set <String > getAliasCommandNames () {
23252355 return aliasCommandNames ;
23262356 }
@@ -3300,6 +3330,13 @@ public void run() {
33003330 }
33013331 }
33023332
3333+ /**
3334+ * Processes a slot click action from a GUI.
3335+ *
3336+ * @param player the player
3337+ * @param user the voting plugin user
3338+ * @param slot the slot identifier
3339+ */
33033340 public void processSlotClick (Player player , VotingPluginUser user , String slot ) {
33043341 if (MessageAPI .startsWithIgnoreCase (slot , "url" )) {
33053342 new VoteURL (plugin , player , user , true ).open ();
0 commit comments