Skip to content

Minecraft spigot plugin that handles configuration loading for other plugins.

Notifications You must be signed in to change notification settings

nuriofernandez/GrechConfigPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GrechConfigPlugin

Minecraft spigot plugin that handles configuration loading for other plugins.

Maven dependency

<repository>
    <id>nurio-repo</id>
    <url>https://maven.nurio.me/</url>
</repository>
<dependency>
    <groupId>me.nurio</groupId>
    <artifactId>bukkit.configuration</artifactId>
    <version>1.2</version>
    <scope>provided</scope>
</dependency>

Usage examples

// Instanciate the GrechConfig class
// GrechAreas is the main class of the GrechAreas plugin
GrechConfig config = new GrechConfig(GrechAreas.getPlugin(), "areas" + File.separator + file.getName());

// Retrieve data from the file
String name = config.getConfig().getString("name");
UUID uuid = UUID.fromString(config.getConfig().getString("uuid"));

// Retrieve locations from the file
Location start = config.getLocation("areas.1.start");
Location end = config.getLocation("areas.1.end");