mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-01 07:36:42 +00:00
implmenetation
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package me.totalfreedom.plex.command.impl;
|
||||
package me.totalfreedom.plex.command;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
@ -1,4 +1,4 @@
|
||||
package me.totalfreedom.plex.command.impl;
|
||||
package me.totalfreedom.plex.command;
|
||||
|
||||
import me.totalfreedom.plex.rank.enums.Rank;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package me.totalfreedom.plex.command.impl;
|
||||
package me.totalfreedom.plex.command;
|
||||
|
||||
import lombok.Getter;
|
||||
import me.totalfreedom.plex.player.PlexPlayer;
|
51
src/main/java/me/totalfreedom/plex/command/MainConfig.java
Normal file
51
src/main/java/me/totalfreedom/plex/command/MainConfig.java
Normal file
@ -0,0 +1,51 @@
|
||||
package me.totalfreedom.plex.command;
|
||||
|
||||
import java.io.File;
|
||||
import me.totalfreedom.plex.Plex;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
public class MainConfig extends YamlConfiguration
|
||||
{
|
||||
private Plex plugin;
|
||||
private File file;
|
||||
|
||||
public MainConfig(Plex plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
this.file = new File(plugin.getDataFolder(), "config.yml");
|
||||
|
||||
if (!file.exists())
|
||||
{
|
||||
saveDefault();
|
||||
}
|
||||
}
|
||||
|
||||
public void load()
|
||||
{
|
||||
try
|
||||
{
|
||||
super.load(file);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void save()
|
||||
{
|
||||
try
|
||||
{
|
||||
super.save(file);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void saveDefault()
|
||||
{
|
||||
plugin.saveResource("config.yml", false);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package me.totalfreedom.plex.command.impl;
|
||||
package me.totalfreedom.plex.command;
|
||||
|
||||
import me.totalfreedom.plex.PlexBase;
|
||||
import me.totalfreedom.plex.rank.enums.Rank;
|
@ -1,4 +1,4 @@
|
||||
package me.totalfreedom.plex.command.impl;
|
||||
package me.totalfreedom.plex.command;
|
||||
|
||||
public enum RequiredCommandSource
|
||||
{
|
Reference in New Issue
Block a user