Add alttdconfig
This commit is contained in:
parent
2b76b90033
commit
6f2e6b3d05
|
|
@ -22,7 +22,7 @@ import me.ryanhamshire.GriefPrevention.DataStore.NoTransferException;
|
|||
import me.ryanhamshire.GriefPrevention.events.PreventBlockBreakEvent;
|
||||
import me.ryanhamshire.GriefPrevention.events.SaveTrappedPlayerEvent;
|
||||
import me.ryanhamshire.GriefPrevention.events.TrustChangedEvent;
|
||||
import me.ryanhamshire.GriefPrevention.listeners.AltitudeListener;
|
||||
import me.ryanhamshire.GriefPrevention.alttd.listeners.AltitudeListener;
|
||||
import me.ryanhamshire.GriefPrevention.metrics.MetricsHandler;
|
||||
import net.milkbowl.vault.economy.Economy;
|
||||
import org.bukkit.BanList;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package me.ryanhamshire.GriefPrevention.alttd.config;
|
||||
|
||||
import com.alttd.galaxy.configuration.AbstractConfiguration;
|
||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class AlttdConfig extends AbstractConfiguration
|
||||
{
|
||||
|
||||
private AlttdConfig() {
|
||||
super(GriefPrevention.instance.getDataFolder(),"alttdconfig.yml");
|
||||
}
|
||||
|
||||
static AlttdConfig config;
|
||||
static int version;
|
||||
|
||||
public static void reload() {
|
||||
config = new AlttdConfig();
|
||||
|
||||
version = config.getInt("config-version", 1);
|
||||
config.set("config-version", 1);
|
||||
|
||||
config.readConfig(AlttdConfig.class, null);
|
||||
}
|
||||
|
||||
public static boolean DEBUG_MODE = false;
|
||||
private static void settings() {
|
||||
DEBUG_MODE = config.getBoolean("debug-mode", DEBUG_MODE);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package me.ryanhamshire.GriefPrevention.listeners;
|
||||
package me.ryanhamshire.GriefPrevention.alttd.listeners;
|
||||
|
||||
import com.destroystokyo.paper.event.block.TNTPrimeEvent;
|
||||
import me.ryanhamshire.GriefPrevention.Claim;
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package me.ryanhamshire.GriefPrevention.alttd.util;
|
||||
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.logging.Level;
|
||||
public class Logger
|
||||
{
|
||||
|
||||
public static void info(String str) {
|
||||
log(Level.INFO,"&e" + str);
|
||||
}
|
||||
|
||||
public static void warn(String str) {
|
||||
log(Level.SEVERE,"&6" + str);
|
||||
}
|
||||
|
||||
public static void severe(String str) {
|
||||
log(Level.SEVERE,"&c" + str);
|
||||
}
|
||||
|
||||
public static void log(Level level, String str) {
|
||||
Bukkit.getLogger().log(level,
|
||||
ChatColor.translateAlternateColorCodes('&',
|
||||
"&r " + str));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user