forked from Upstream/mmocore
!tiny cleanup
This commit is contained in:
parent
f9b9015790
commit
c0bdf1ee12
BIN
lib/MMOItems.jar
BIN
lib/MMOItems.jar
Binary file not shown.
@ -1,17 +1,5 @@
|
||||
package net.Indyuce.mmocore;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashSet;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandMap;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import net.Indyuce.mmocore.api.ConfigFile;
|
||||
import net.Indyuce.mmocore.api.PlayerActionBar;
|
||||
import net.Indyuce.mmocore.api.loot.LootChest;
|
||||
@ -97,6 +85,17 @@ import net.Indyuce.mmocore.manager.social.PartyManager;
|
||||
import net.Indyuce.mmocore.manager.social.RequestManager;
|
||||
import net.mmogroup.mmolib.comp.Metrics;
|
||||
import net.mmogroup.mmolib.version.SpigotPlugin;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandMap;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashSet;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class MMOCore extends JavaPlugin {
|
||||
public static MMOCore plugin;
|
||||
@ -109,7 +108,6 @@ public class MMOCore extends JavaPlugin {
|
||||
public VaultEconomy economy;
|
||||
public HologramSupport hologramSupport;
|
||||
public AntiCheatSupport antiCheatSupport;
|
||||
public InventoryManager inventoryManager;
|
||||
public RegionHandler regionHandler = new DefaultRegionHandler();
|
||||
public FlagPlugin flagPlugin = new DefaultFlags();
|
||||
public PlaceholderParser placeholderParser = new DefaultParser();
|
||||
@ -268,8 +266,10 @@ public class MMOCore extends JavaPlugin {
|
||||
/*
|
||||
* enable debug mode for extra debug tools.
|
||||
*/
|
||||
if (getConfig().contains("debug"))
|
||||
new DebugMode(getConfig().getInt("debug", 0));
|
||||
if (getConfig().contains("debug")) {
|
||||
DebugMode.setLevel(getConfig().getInt("debug", 0));
|
||||
DebugMode.enableActionBar();
|
||||
}
|
||||
|
||||
if (configManager.overrideVanillaExp = getConfig().getBoolean("override-vanilla-exp"))
|
||||
Bukkit.getPluginManager().registerEvents(new VanillaExperienceOverride(), this);
|
||||
@ -412,7 +412,7 @@ public class MMOCore extends JavaPlugin {
|
||||
classManager.clear();
|
||||
classManager.reload();
|
||||
|
||||
inventoryManager = new InventoryManager();
|
||||
InventoryManager.load();
|
||||
|
||||
questManager.clear();
|
||||
questManager.reload();
|
||||
|
@ -14,8 +14,11 @@ public class DebugMode {
|
||||
*/
|
||||
public static int level = 0;
|
||||
|
||||
public DebugMode(int i) {
|
||||
public static void setLevel(int i) {
|
||||
level = i;
|
||||
}
|
||||
|
||||
public static void enableActionBar() {
|
||||
if (level > 2 && MMOCore.plugin.getConfig().getBoolean("debug-action-bar.enabled"))
|
||||
new ActionBarRunnable().runTaskTimer(MMOCore.plugin, 0, 10);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class InventoryManager {
|
||||
|
||||
public static final List<EditableInventory> list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION);
|
||||
|
||||
public InventoryManager() {
|
||||
public static void load() {
|
||||
list.forEach(inv -> {
|
||||
MMOCore.plugin.configManager.loadDefaultFile("gui", inv.getId() + ".yml");
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user