mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
Merge
This commit is contained in:
parent
b3d783dea4
commit
7141039485
@ -88,6 +88,7 @@ public class MMOCore extends JavaPlugin {
|
||||
public final MMOLoadManager loadManager = new MMOLoadManager();
|
||||
public final RestrictionManager restrictionManager = new RestrictionManager();
|
||||
public final SkillTreeManager skillTreeManager = new SkillTreeManager();
|
||||
public final StatManager statManager = new StatManager();
|
||||
|
||||
// Profession managers
|
||||
public final CustomBlockManager mineManager = new CustomBlockManager();
|
||||
@ -142,7 +143,8 @@ public class MMOCore extends JavaPlugin {
|
||||
loadManager.registerLoader(new MythicMobsMMOLoader());
|
||||
}
|
||||
|
||||
public void enable() {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
new SpigotPlugin(70575, this).checkForUpdate();
|
||||
new Metrics(this);
|
||||
saveDefaultConfig();
|
||||
@ -419,7 +421,7 @@ public class MMOCore extends JavaPlugin {
|
||||
|
||||
// Drop tables must be loaded before professions
|
||||
dropTableManager.initialize(clearBefore);
|
||||
|
||||
statManager.initialize(clearBefore);
|
||||
professionManager.initialize(clearBefore);
|
||||
classManager.initialize(clearBefore);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package net.Indyuce.mmocore.quest;
|
||||
|
||||
import net.Indyuce.mmocore.quest.compat.BeautyQuestsModule;
|
||||
import net.Indyuce.mmocore.quest.compat.BeautyQuestModule;
|
||||
import net.Indyuce.mmocore.quest.compat.BlackVeinQuestsModule;
|
||||
import net.Indyuce.mmocore.quest.compat.QuestCreatorModule;
|
||||
import net.Indyuce.mmocore.quest.compat.QuestModule;
|
||||
@ -11,7 +11,7 @@ import javax.inject.Provider;
|
||||
public enum QuestModuleType {
|
||||
MMOCORE("MMOCore", MMOCoreQuestModule::new),
|
||||
QUESTS("Quests", BlackVeinQuestsModule::new),
|
||||
BEAUTY_QUEST("BeautyQuests", BeautyQuestsModule::new),
|
||||
BEAUTY_QUEST("BeautyQuests", BeautyQuestModule::new),
|
||||
QUEST_CREATOR("QuestCreator", QuestCreatorModule::new);
|
||||
|
||||
private final String pluginName;
|
||||
|
@ -5,7 +5,6 @@ import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.api.MMOLineConfig;
|
||||
import io.lumine.mythic.lib.player.modifier.PlayerModifier;
|
||||
import io.lumine.mythic.lib.util.configobject.ConfigObject;
|
||||
import io.lumine.mythic.lib.util.configobject.LineConfigObject;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.api.quest.trigger.Trigger;
|
||||
@ -80,11 +79,14 @@ public class SkillTreeNode implements Unlockable {
|
||||
for (String level : section.getKeys(false)) {
|
||||
int value = Integer.parseInt(level);
|
||||
for (String str : section.getStringList(level)) {
|
||||
Trigger trigger = MMOCore.plugin.loadManager.loadTrigger(new MMOLineConfig(str));
|
||||
if (!triggers.containsKey(value)) {
|
||||
triggers.put(value, new ArrayList<>());
|
||||
List<Trigger> triggerList = MMOCore.plugin.loadManager.loadTrigger(new MMOLineConfig(str));
|
||||
for (Trigger trigger : triggerList) {
|
||||
if (!triggers.containsKey(value)) {
|
||||
triggers.put(value, new ArrayList<>());
|
||||
}
|
||||
triggers.get(value).add(trigger);
|
||||
}
|
||||
triggers.get(value).add(trigger);
|
||||
|
||||
}
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
@ -98,7 +100,7 @@ public class SkillTreeNode implements Unlockable {
|
||||
for (String level : section.getKeys(false)) {
|
||||
int value = Integer.parseInt(level);
|
||||
for (String str : section.getStringList(level)) {
|
||||
PlayerModifier modifier = MythicLib.plugin.getModifiers().loadPlayerModifier(new LineConfigObject(new MMOLineConfig(str)));
|
||||
PlayerModifier modifier = MythicLib.plugin.getModifiers().loadPlayerModifier(new MMOLineConfig(str));
|
||||
if (!modifiers.containsKey(value)) {
|
||||
modifiers.put(value, new ArrayList<>());
|
||||
}
|
||||
@ -116,7 +118,7 @@ public class SkillTreeNode implements Unlockable {
|
||||
maxChildren = config.contains("max-children") ? config.getInt("max-children") : 1;
|
||||
//If coordinates are precised adn we are not wiht an automaticTree we set them up
|
||||
if ((!(tree instanceof AutomaticSkillTree))) {
|
||||
Validate.isTrue(config.contains("coordinates.x") && config.contains("coordinates.y"),"No coordinates specified");
|
||||
Validate.isTrue(config.contains("coordinates.x") && config.contains("coordinates.y"), "No coordinates specified");
|
||||
coordinates = new IntegerCoordinates(config.getInt("coordinates.x"), config.getInt("coordinates.y"));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user