Skip to content

Commit

Permalink
* All merges complete. Ready for use
Browse files Browse the repository at this point in the history
* Added new FileManager
  • Loading branch information
Hempfest committed Mar 22, 2021
1 parent c79eb1d commit 9b3cfe4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/github/sanctum/labyrinth/data/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
import java.util.List;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;

/**
* @deprecated No longer supported. Replaced by {@link} and marked for later removal.
* @deprecated No longer supported. Replaced by {@link FileList#search(Plugin)} and marked for later removal.
*/
public class Config {
private final String n;
Expand Down
14 changes: 11 additions & 3 deletions src/main/java/com/github/sanctum/labyrinth/data/FileList.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ private FileList(Plugin plugin) {
REGISTRY.add(this);
}

/**
* Using a {@link org.bukkit.plugin.java.JavaPlugin} as the key, look for specific files.
* <p>
* Using your plugins main class instance create custom data files with ease sourcing from
* your plugins main folder.
*
* @param plugin The plugin source to browse.
* @return A potential listing of configuration.
*/
public static FileList search(@NotNull final Plugin plugin) {
FileList list = null;
for (FileList listing : REGISTRY) {
Expand All @@ -33,9 +42,8 @@ public static FileList search(@NotNull final Plugin plugin) {
/**
* Retrieve a Config instance via its name and description.
* <p>
* This method only resolves config objects for myEssentials; if you
* wish to manage your own configs see this method and the fields
* above for a general format of a static backing.
* This method resolves config objects for any {@link org.bukkit.plugin.java.JavaPlugin}
* main class passed through the initial search query.
*
* @param name Name of config file
* @param desc Description of config file (designate subdirectory)
Expand Down

0 comments on commit 9b3cfe4

Please sign in to comment.