-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YamlFile: Constructor now requires a parent file
This allows flexibility to create yaml files, a null parent file will just create it on the specified path. The most common use for this is to create plugin files as follows: `YamlConfig config = new YamlConfig(plugin.getDataFolder(), "config.yml")`
- Loading branch information
Showing
3 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
8 changes: 6 additions & 2 deletions
8
shared/src/main/java/net/codersky/mcutils/storage/files/yaml/YamlConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
package net.codersky.mcutils.storage.files.yaml; | ||
|
||
import net.codersky.mcutils.storage.Config; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.io.File; | ||
|
||
public class YamlConfig extends YamlFile implements Config { | ||
|
||
public YamlConfig(String path) { | ||
super(path); | ||
public YamlConfig(@Nullable File parent, @NotNull String path) { | ||
super(parent, path); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters