forked from Upstream/mmocore
Merge remote-tracking branch 'origin/master'
# Conflicts: # MMOCore-API/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java
This commit is contained in:
commit
c94795fc89
@ -341,7 +341,6 @@ public class MMOCore extends JavaPlugin {
|
||||
statManager.initialize(clearBefore);
|
||||
professionManager.initialize(clearBefore);
|
||||
|
||||
InventoryManager.load();
|
||||
skillTreeManager.initialize(clearBefore);
|
||||
classManager.initialize(clearBefore);
|
||||
questManager.initialize(clearBefore);
|
||||
@ -351,6 +350,8 @@ public class MMOCore extends JavaPlugin {
|
||||
requestManager.initialize(clearBefore);
|
||||
soundManager.initialize(clearBefore);
|
||||
configItems.initialize(clearBefore);
|
||||
//Needs to be loaded after the class manager.
|
||||
InventoryManager.load();
|
||||
|
||||
if (getConfig().isConfigurationSection("action-bar"))
|
||||
actionBarManager.reload(getConfig().getConfigurationSection("action-bar"));
|
||||
|
@ -851,6 +851,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
new ConfigMessage("level-up").addPlaceholders("level", String.valueOf(level)).send(getPlayer());
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.LEVEL_UP).playTo(getPlayer());
|
||||
new SmallParticleEffect(getPlayer(), Particle.SPELL_INSTANT);
|
||||
//TEST
|
||||
}
|
||||
getStats().updateStats();
|
||||
}
|
||||
@ -950,7 +951,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
|
||||
@Override
|
||||
public double getHealth() {
|
||||
return health;
|
||||
return isOnline() ? getPlayer().getHealth():health ;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -300,6 +300,8 @@ public class SavedClassInformation {
|
||||
player.setMana(mana);
|
||||
player.setStellium(stellium);
|
||||
player.setStamina(stamina);
|
||||
double health=this.health;
|
||||
health = health == 0 ? 20 : health;
|
||||
player.getPlayer().setHealth(Math.min(health,player.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
|
||||
// Updates level on exp bar
|
||||
player.refreshVanillaExp();
|
||||
|
@ -47,8 +47,6 @@ public class QuestProgress {
|
||||
objective++;
|
||||
objectiveProgress.close();
|
||||
|
||||
// apply triggers
|
||||
objectiveProgress.getObjective().getTriggers().forEach(trigger -> trigger.schedule(getPlayer()));
|
||||
|
||||
// end quest
|
||||
if (objective >= quest.getObjectives().size())
|
||||
@ -57,6 +55,10 @@ public class QuestProgress {
|
||||
objectiveProgress = nextObjective().newProgress(this);
|
||||
|
||||
player.getQuestData().updateBossBar();
|
||||
|
||||
|
||||
// apply triggers at the end so the quest is ended when a trigger quest start is launched.
|
||||
objectiveProgress.getObjective().getTriggers().forEach(trigger -> trigger.schedule(getPlayer()));
|
||||
}
|
||||
|
||||
public String getFormattedLore() {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package net.Indyuce.mmocore.comp.placeholder;
|
||||
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.UtilityMethods;
|
||||
import io.lumine.mythic.lib.api.util.AltChar;
|
||||
import io.lumine.mythic.lib.manager.StatManager;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
@ -183,8 +184,8 @@ public class RPGPlaceholders extends PlaceholderExpansion {
|
||||
}
|
||||
|
||||
else if (identifier.startsWith("stat_")) {
|
||||
final String stat = identifier.substring(5).toUpperCase();
|
||||
return StatManager.format(identifier.substring(5), playerData.getStats().getStat(stat));
|
||||
final String stat = UtilityMethods.enumName(identifier.substring(5));
|
||||
return StatManager.format(stat, playerData.getMMOPlayerData());
|
||||
}
|
||||
|
||||
else if (identifier.equals("stellium"))
|
||||
|
@ -1,12 +1,12 @@
|
||||
package net.Indyuce.mmocore.gui;
|
||||
|
||||
import io.lumine.mythic.lib.UtilityMethods;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.SoundEvent;
|
||||
import net.Indyuce.mmocore.api.event.PlayerChangeClassEvent;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.api.player.profess.PlayerClass;
|
||||
import net.Indyuce.mmocore.api.player.profess.SavedClassInformation;
|
||||
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
|
||||
import net.Indyuce.mmocore.gui.api.EditableInventory;
|
||||
import net.Indyuce.mmocore.gui.api.GeneratedInventory;
|
||||
import net.Indyuce.mmocore.gui.api.InventoryClickContext;
|
||||
@ -21,21 +21,14 @@ import org.bukkit.Material;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ClassConfirmation extends EditableInventory {
|
||||
|
||||
/**
|
||||
* This enables to configure the name of the
|
||||
* class confirmation GUI (for custom GUI textures).
|
||||
*/
|
||||
private final Map<String, String> specificNames = new HashMap<>();
|
||||
private final PlayerClass playerClass;
|
||||
|
||||
public ClassConfirmation() {
|
||||
super("class-confirm");
|
||||
public ClassConfirmation(PlayerClass playerClass) {
|
||||
super("class-confirm-"+ UtilityMethods.ymlName(playerClass.getId()));
|
||||
this.playerClass=playerClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -43,21 +36,13 @@ public class ClassConfirmation extends EditableInventory {
|
||||
return function.equalsIgnoreCase("yes") ? new YesItem(config) : new SimplePlaceholderItem(config);
|
||||
}
|
||||
|
||||
public GeneratedInventory newInventory(PlayerData data, PlayerClass profess, PluginInventory last) {
|
||||
return new ClassConfirmationInventory(data, this, profess, last);
|
||||
public GeneratedInventory newInventory(PlayerData data, PluginInventory last) {
|
||||
return new ClassConfirmationInventory(data, this, playerClass, last);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reload(FileConfiguration config) {
|
||||
super.reload(config);
|
||||
|
||||
specificNames.clear();
|
||||
|
||||
if (config.contains("class-specific-name")) {
|
||||
final ConfigurationSection section = config.getConfigurationSection("class-specific-name");
|
||||
for (String key : section.getKeys(false))
|
||||
specificNames.put(key, section.getString(key));
|
||||
}
|
||||
}
|
||||
|
||||
public class UnlockedItem extends InventoryItem<ClassConfirmationInventory> {
|
||||
@ -154,9 +139,7 @@ public class ClassConfirmation extends EditableInventory {
|
||||
|
||||
@Override
|
||||
public String calculateName() {
|
||||
final String professKey = MMOCoreUtils.ymlName(profess.getId());
|
||||
final @Nullable String found = specificNames.get(professKey);
|
||||
return found == null ? getName().replace("{class}", profess.getName()) : found;
|
||||
return getName().replace("{class}", profess.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,21 @@
|
||||
package net.Indyuce.mmocore.gui;
|
||||
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.UtilityMethods;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.ConfigMessage;
|
||||
import net.Indyuce.mmocore.api.SoundEvent;
|
||||
import net.Indyuce.mmocore.api.player.PlayerData;
|
||||
import net.Indyuce.mmocore.api.player.profess.ClassOption;
|
||||
import net.Indyuce.mmocore.api.player.profess.PlayerClass;
|
||||
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
|
||||
import net.Indyuce.mmocore.gui.api.EditableInventory;
|
||||
import net.Indyuce.mmocore.gui.api.GeneratedInventory;
|
||||
import net.Indyuce.mmocore.gui.api.InventoryClickContext;
|
||||
import net.Indyuce.mmocore.gui.api.item.InventoryItem;
|
||||
import net.Indyuce.mmocore.gui.api.item.SimplePlaceholderItem;
|
||||
import net.Indyuce.mmocore.manager.InventoryManager;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
@ -24,6 +27,7 @@ import org.bukkit.persistence.PersistentDataType;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class ClassSelect extends EditableInventory {
|
||||
@ -33,7 +37,7 @@ public class ClassSelect extends EditableInventory {
|
||||
|
||||
@Override
|
||||
public InventoryItem load(String function, ConfigurationSection config) {
|
||||
return function.equals("class") ? new ClassItem(config) : new SimplePlaceholderItem(config);
|
||||
return function.startsWith("class") ? new ClassItem(config) : new SimplePlaceholderItem(config);
|
||||
}
|
||||
|
||||
public GeneratedInventory newInventory(PlayerData data) {
|
||||
@ -43,10 +47,13 @@ public class ClassSelect extends EditableInventory {
|
||||
public class ClassItem extends SimplePlaceholderItem<ProfessSelectionInventory> {
|
||||
private final String name;
|
||||
private final List<String> lore;
|
||||
private final PlayerClass playerClass;
|
||||
|
||||
public ClassItem(ConfigurationSection config) {
|
||||
super(Material.BARRIER, config);
|
||||
|
||||
Validate.isTrue(config.getString("function").length()>6,"Couldn't find the class associated to: "+config.getString("function"));
|
||||
String classId = UtilityMethods.enumName(config.getString("function").substring(6));
|
||||
this.playerClass = Objects.requireNonNull(MMOCore.plugin.classManager.get(classId),classId+" does not correspond to any classId.");
|
||||
this.name = config.getString("name");
|
||||
this.lore = config.getStringList("lore");
|
||||
}
|
||||
@ -60,29 +67,28 @@ public class ClassSelect extends EditableInventory {
|
||||
if (n >= inv.classes.size())
|
||||
return null;
|
||||
|
||||
PlayerClass profess = inv.classes.get(n);
|
||||
ItemStack item = profess.getIcon();
|
||||
ItemStack item = playerClass.getIcon();
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
if (hideFlags())
|
||||
meta.addItemFlags(ItemFlag.values());
|
||||
meta.setDisplayName(MythicLib.plugin.parseColors(name).replace("{name}", profess.getName()));
|
||||
meta.setDisplayName(MythicLib.plugin.parseColors(name).replace("{name}", playerClass.getName()));
|
||||
List<String> lore = new ArrayList<>(this.lore);
|
||||
|
||||
int index = lore.indexOf("{lore}");
|
||||
if (index >= 0) {
|
||||
lore.remove(index);
|
||||
for (int j = 0; j < profess.getDescription().size(); j++)
|
||||
lore.add(index + j, profess.getDescription().get(j));
|
||||
for (int j = 0; j < playerClass.getDescription().size(); j++)
|
||||
lore.add(index + j, playerClass.getDescription().get(j));
|
||||
}
|
||||
|
||||
index = lore.indexOf("{attribute-lore}");
|
||||
if (index >= 0) {
|
||||
lore.remove(index);
|
||||
for (int j = 0; j < profess.getAttributeDescription().size(); j++)
|
||||
lore.add(index + j, profess.getAttributeDescription().get(j));
|
||||
for (int j = 0; j < playerClass.getAttributeDescription().size(); j++)
|
||||
lore.add(index + j, playerClass.getAttributeDescription().get(j));
|
||||
}
|
||||
|
||||
meta.getPersistentDataContainer().set(new NamespacedKey(MMOCore.plugin, "class_id"), PersistentDataType.STRING, profess.getId());
|
||||
meta.getPersistentDataContainer().set(new NamespacedKey(MMOCore.plugin, "class_id"), PersistentDataType.STRING, playerClass.getId());
|
||||
meta.setLore(lore);
|
||||
item.setItemMeta(meta);
|
||||
return item;
|
||||
@ -104,10 +110,8 @@ public class ClassSelect extends EditableInventory {
|
||||
|
||||
@Override
|
||||
public void whenClicked(InventoryClickContext context, InventoryItem item) {
|
||||
if (item.getFunction().equals("class")) {
|
||||
String classId = context.getClickedItem().getItemMeta().getPersistentDataContainer().get(new NamespacedKey(MMOCore.plugin, "class_id"), PersistentDataType.STRING);
|
||||
if (classId.equals(""))
|
||||
return;
|
||||
if (item instanceof ClassItem) {
|
||||
PlayerClass profess = ((ClassItem) item).playerClass;
|
||||
|
||||
if (playerData.getClassPoints() < 1) {
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.CANT_SELECT_CLASS).playTo(player);
|
||||
@ -115,7 +119,6 @@ public class ClassSelect extends EditableInventory {
|
||||
return;
|
||||
}
|
||||
|
||||
final PlayerClass profess = MMOCore.plugin.classManager.get(classId);
|
||||
if (profess.hasOption(ClassOption.NEEDS_PERMISSION) && !player.hasPermission("mmocore.class." + profess.getId().toLowerCase())) {
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.CANT_SELECT_CLASS).playTo(player);
|
||||
new ConfigMessage("no-permission-for-class").send(player);
|
||||
@ -129,7 +132,7 @@ public class ClassSelect extends EditableInventory {
|
||||
}
|
||||
|
||||
final PlayerClass playerClass = findDeepestSubclass(playerData, profess);
|
||||
InventoryManager.CLASS_CONFIRM.newInventory(playerData, playerClass, this).open();
|
||||
InventoryManager.CLASS_CONFIRM.get(MMOCoreUtils.ymlName(playerClass.getId())).newInventory(playerData, this).open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
package net.Indyuce.mmocore.manager;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import net.Indyuce.mmocore.api.player.profess.PlayerClass;
|
||||
import net.Indyuce.mmocore.api.util.MMOCoreUtils;
|
||||
import net.Indyuce.mmocore.gui.social.friend.EditableFriendList;
|
||||
import net.Indyuce.mmocore.gui.*;
|
||||
import net.Indyuce.mmocore.gui.social.friend.EditableFriendRemoval;
|
||||
@ -20,7 +21,7 @@ public class InventoryManager {
|
||||
public static final SkillList SKILL_LIST = new SkillList();
|
||||
public static final ClassSelect CLASS_SELECT = new ClassSelect();
|
||||
public static final SubclassSelect SUBCLASS_SELECT = new SubclassSelect();
|
||||
public static final ClassConfirmation CLASS_CONFIRM = new ClassConfirmation();
|
||||
public static final Map<String, ClassConfirmation> CLASS_CONFIRM = new HashMap<>();
|
||||
public static final SubclassConfirmation SUBCLASS_CONFIRM = new SubclassConfirmation();
|
||||
public static final WaypointViewer WAYPOINTS = new WaypointViewer();
|
||||
public static final EditableFriendList FRIEND_LIST = new EditableFriendList();
|
||||
@ -32,15 +33,22 @@ public class InventoryManager {
|
||||
public static final QuestViewer QUEST_LIST = new QuestViewer();
|
||||
public static final AttributeView ATTRIBUTE_VIEW = new AttributeView();
|
||||
public static final SkillTreeViewer TREE_VIEW = new SkillTreeViewer();
|
||||
public static final List<EditableInventory> list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, TREE_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 static final List<EditableInventory> list = new ArrayList(Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, TREE_VIEW, SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION));
|
||||
|
||||
public static void load() {
|
||||
for (PlayerClass playerClass : MMOCore.plugin.classManager.getAll()) {
|
||||
ClassConfirmation GUI = new ClassConfirmation(playerClass);
|
||||
CLASS_CONFIRM.put(MMOCoreUtils.ymlName(playerClass.getId()), GUI);
|
||||
list.add(GUI);
|
||||
}
|
||||
|
||||
list.forEach(inv -> {
|
||||
MMOCore.plugin.configManager.loadDefaultFile("gui", inv.getId() + ".yml");
|
||||
String folder="gui"+(inv instanceof ClassConfirmation?"/class-confirm":"");
|
||||
try {
|
||||
inv.reload(new ConfigFile("/gui", inv.getId()).getConfig());
|
||||
} catch (IllegalArgumentException exception) {
|
||||
MMOCore.log(Level.WARNING, "Could not load inventory '" + inv.getId() + "': " + exception.getMessage());
|
||||
MMOCore.plugin.configManager.loadDefaultFile(folder, inv.getId() + ".yml");
|
||||
inv.reload(new ConfigFile("/"+folder, inv.getId()).getConfig());
|
||||
} catch (Exception exception) {
|
||||
MMOCore.log(Level.WARNING, "Could not load inventory '" +(inv instanceof ClassConfirmation?"class-confirm/":""+ inv.getId() + "': " + exception.getMessage()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -124,8 +124,8 @@ public class YAMLPlayerDataManager extends PlayerDataManager {
|
||||
data.setStamina(config.contains("stamina") ? config.getDouble("stamina") : data.getStats().getStat("MAX_STAMINA"));
|
||||
data.setStellium(config.contains("stellium") ? config.getDouble("stellium") : data.getStats().getStat("MAX_STELLIUM"));
|
||||
double health = config.contains("health") ? config.getDouble("health") : data.getStats().getStat("MAX_HEALTH");
|
||||
health = health == 0 ? data.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue() : health;
|
||||
health = Math.max(Math.min(health, data.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()), 0);
|
||||
health = health == 0 ? 20 : health;
|
||||
health = Math.min(health, data.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
|
||||
data.getPlayer().setHealth(health);
|
||||
|
||||
data.setFullyLoaded();
|
||||
|
@ -1,16 +1,6 @@
|
||||
|
||||
# GUI display name, used by default
|
||||
name: 'Confirmation: {class}'
|
||||
|
||||
# GUI display name which overrides the default one.
|
||||
# This can be used to apply custom textures to the GUI
|
||||
class-specific-name:
|
||||
mage: "Select Mage"
|
||||
rogue: "Select Rogue"
|
||||
marksman: "Select Marksman"
|
||||
warrior: "Select Warrior"
|
||||
paladin: "Select Paladin"
|
||||
|
||||
# Number of slots in your inventory. Must be
|
||||
# between 9 and 54 and must be a multiple of 9.
|
||||
slots: 27
|
@ -0,0 +1,38 @@
|
||||
# GUI display name, used by default
|
||||
name: 'Confirmation: {class}'
|
||||
|
||||
# Number of slots in your inventory. Must be
|
||||
# between 9 and 54 and must be a multiple of 9.
|
||||
slots: 27
|
||||
|
||||
items:
|
||||
yes:
|
||||
slots: [12]
|
||||
function: 'yes'
|
||||
|
||||
# Displayed when the player had already selected this class
|
||||
# before (only if class slots are enabled in the config).
|
||||
unlocked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore:
|
||||
- ''
|
||||
- '&7Class Level: &e{level}'
|
||||
- '&7Progression: &e{exp} / {next_level}'
|
||||
- '&8[&e{progress}&8] &e{percent}%'
|
||||
- ''
|
||||
- '&7Skill Points: &6{skill_points}'
|
||||
- '&7Skills You Unlocked: &6{unlocked_skills}&7/&6{class_skills}'
|
||||
|
||||
# Displayed when the class is being chosen for the first time.
|
||||
locked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore: {}
|
||||
|
||||
back:
|
||||
slots: [14]
|
||||
item: RED_TERRACOTTA
|
||||
function: back
|
||||
name: '&aBack'
|
||||
lore: {}
|
@ -0,0 +1,38 @@
|
||||
# GUI display name, used by default
|
||||
name: 'Confirmation: {class}'
|
||||
|
||||
# Number of slots in your inventory. Must be
|
||||
# between 9 and 54 and must be a multiple of 9.
|
||||
slots: 27
|
||||
|
||||
items:
|
||||
yes:
|
||||
slots: [12]
|
||||
function: 'yes'
|
||||
|
||||
# Displayed when the player had already selected this class
|
||||
# before (only if class slots are enabled in the config).
|
||||
unlocked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore:
|
||||
- ''
|
||||
- '&7Class Level: &e{level}'
|
||||
- '&7Progression: &e{exp} / {next_level}'
|
||||
- '&8[&e{progress}&8] &e{percent}%'
|
||||
- ''
|
||||
- '&7Skill Points: &6{skill_points}'
|
||||
- '&7Skills You Unlocked: &6{unlocked_skills}&7/&6{class_skills}'
|
||||
|
||||
# Displayed when the class is being chosen for the first time.
|
||||
locked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore: {}
|
||||
|
||||
back:
|
||||
slots: [14]
|
||||
item: RED_TERRACOTTA
|
||||
function: back
|
||||
name: '&aBack'
|
||||
lore: {}
|
@ -0,0 +1,38 @@
|
||||
# GUI display name, used by default
|
||||
name: 'Confirmation: {class}'
|
||||
|
||||
# Number of slots in your inventory. Must be
|
||||
# between 9 and 54 and must be a multiple of 9.
|
||||
slots: 27
|
||||
|
||||
items:
|
||||
yes:
|
||||
slots: [12]
|
||||
function: 'yes'
|
||||
|
||||
# Displayed when the player had already selected this class
|
||||
# before (only if class slots are enabled in the config).
|
||||
unlocked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore:
|
||||
- ''
|
||||
- '&7Class Level: &e{level}'
|
||||
- '&7Progression: &e{exp} / {next_level}'
|
||||
- '&8[&e{progress}&8] &e{percent}%'
|
||||
- ''
|
||||
- '&7Skill Points: &6{skill_points}'
|
||||
- '&7Skills You Unlocked: &6{unlocked_skills}&7/&6{class_skills}'
|
||||
|
||||
# Displayed when the class is being chosen for the first time.
|
||||
locked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore: {}
|
||||
|
||||
back:
|
||||
slots: [14]
|
||||
item: RED_TERRACOTTA
|
||||
function: back
|
||||
name: '&aBack'
|
||||
lore: {}
|
@ -0,0 +1,38 @@
|
||||
# GUI display name, used by default
|
||||
name: 'Confirmation: {class}'
|
||||
|
||||
# Number of slots in your inventory. Must be
|
||||
# between 9 and 54 and must be a multiple of 9.
|
||||
slots: 27
|
||||
|
||||
items:
|
||||
yes:
|
||||
slots: [12]
|
||||
function: 'yes'
|
||||
|
||||
# Displayed when the player had already selected this class
|
||||
# before (only if class slots are enabled in the config).
|
||||
unlocked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore:
|
||||
- ''
|
||||
- '&7Class Level: &e{level}'
|
||||
- '&7Progression: &e{exp} / {next_level}'
|
||||
- '&8[&e{progress}&8] &e{percent}%'
|
||||
- ''
|
||||
- '&7Skill Points: &6{skill_points}'
|
||||
- '&7Skills You Unlocked: &6{unlocked_skills}&7/&6{class_skills}'
|
||||
|
||||
# Displayed when the class is being chosen for the first time.
|
||||
locked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore: {}
|
||||
|
||||
back:
|
||||
slots: [14]
|
||||
item: RED_TERRACOTTA
|
||||
function: back
|
||||
name: '&aBack'
|
||||
lore: {}
|
@ -0,0 +1,38 @@
|
||||
# GUI display name, used by default
|
||||
name: 'Confirmation: {class}'
|
||||
|
||||
# Number of slots in your inventory. Must be
|
||||
# between 9 and 54 and must be a multiple of 9.
|
||||
slots: 27
|
||||
|
||||
items:
|
||||
yes:
|
||||
slots: [12]
|
||||
function: 'yes'
|
||||
|
||||
# Displayed when the player had already selected this class
|
||||
# before (only if class slots are enabled in the config).
|
||||
unlocked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore:
|
||||
- ''
|
||||
- '&7Class Level: &e{level}'
|
||||
- '&7Progression: &e{exp} / {next_level}'
|
||||
- '&8[&e{progress}&8] &e{percent}%'
|
||||
- ''
|
||||
- '&7Skill Points: &6{skill_points}'
|
||||
- '&7Skills You Unlocked: &6{unlocked_skills}&7/&6{class_skills}'
|
||||
|
||||
# Displayed when the class is being chosen for the first time.
|
||||
locked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore: {}
|
||||
|
||||
back:
|
||||
slots: [14]
|
||||
item: RED_TERRACOTTA
|
||||
function: back
|
||||
name: '&aBack'
|
||||
lore: {}
|
@ -0,0 +1,38 @@
|
||||
# GUI display name, used by default
|
||||
name: 'Confirmation: {class}'
|
||||
|
||||
# Number of slots in your inventory. Must be
|
||||
# between 9 and 54 and must be a multiple of 9.
|
||||
slots: 27
|
||||
|
||||
items:
|
||||
yes:
|
||||
slots: [12]
|
||||
function: 'yes'
|
||||
|
||||
# Displayed when the player had already selected this class
|
||||
# before (only if class slots are enabled in the config).
|
||||
unlocked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore:
|
||||
- ''
|
||||
- '&7Class Level: &e{level}'
|
||||
- '&7Progression: &e{exp} / {next_level}'
|
||||
- '&8[&e{progress}&8] &e{percent}%'
|
||||
- ''
|
||||
- '&7Skill Points: &6{skill_points}'
|
||||
- '&7Skills You Unlocked: &6{unlocked_skills}&7/&6{class_skills}'
|
||||
|
||||
# Displayed when the class is being chosen for the first time.
|
||||
locked:
|
||||
item: GREEN_TERRACOTTA
|
||||
name: '&aSelect {class}'
|
||||
lore: {}
|
||||
|
||||
back:
|
||||
slots: [14]
|
||||
item: RED_TERRACOTTA
|
||||
function: back
|
||||
name: '&aBack'
|
||||
lore: {}
|
@ -7,10 +7,51 @@ name: Class Selection
|
||||
slots: 27
|
||||
|
||||
items:
|
||||
class:
|
||||
slots: [13,12,14,11,15,10,16]
|
||||
function: class
|
||||
name: '&a&lThe {name}'
|
||||
|
||||
class-rogue:
|
||||
slots: [11]
|
||||
function: class-rogue
|
||||
name: '&a&lThe Rogue'
|
||||
hide-flags: true
|
||||
lore:
|
||||
- '{lore}'
|
||||
- ''
|
||||
- '{attribute-lore}'
|
||||
|
||||
class-mage:
|
||||
slots: [12]
|
||||
function: class-mage
|
||||
name: '&a&lThe Mage'
|
||||
hide-flags: true
|
||||
lore:
|
||||
- '{lore}'
|
||||
- ''
|
||||
- '{attribute-lore}'
|
||||
|
||||
class-marksman:
|
||||
slots: [13]
|
||||
function: class-marksman
|
||||
name: '&a&lThe Marksman'
|
||||
hide-flags: true
|
||||
lore:
|
||||
- '{lore}'
|
||||
- ''
|
||||
- '{attribute-lore}'
|
||||
|
||||
class-warrior:
|
||||
slots: [14]
|
||||
function: class-warrior
|
||||
name: '&a&lThe Warrior'
|
||||
hide-flags: true
|
||||
lore:
|
||||
- '{lore}'
|
||||
- ''
|
||||
- '{attribute-lore}'
|
||||
|
||||
class-paladin:
|
||||
slots: [15]
|
||||
function: class-paladin
|
||||
name: '&a&lThe Paladin'
|
||||
hide-flags: true
|
||||
lore:
|
||||
- '{lore}'
|
||||
|
@ -12,13 +12,13 @@ lore:
|
||||
- '&e{cooldown}s Cooldown'
|
||||
material: EMERALD
|
||||
mana:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
@ -28,6 +28,6 @@ cooldown:
|
||||
min: 1.0
|
||||
percent:
|
||||
base: 10.0
|
||||
per-level: 0.1
|
||||
per-level: 1.1
|
||||
max: 20.0
|
||||
min: 10.0
|
||||
|
@ -8,13 +8,13 @@ mana:
|
||||
base: 8.0
|
||||
per-level: 1.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
extra:
|
||||
base: 50.0
|
||||
per-level: 20.0
|
||||
cooldown:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
|
@ -8,15 +8,15 @@ lore:
|
||||
material: IRON_SWORD
|
||||
damage:
|
||||
base: 9.0
|
||||
per-level: 0.3
|
||||
per-level: 1.3
|
||||
mana:
|
||||
base: 10.0
|
||||
per-level: -0.1
|
||||
max: 5.0
|
||||
min: 3.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
@ -26,4 +26,4 @@ cooldown:
|
||||
min: 5.0
|
||||
count:
|
||||
base: 3.0
|
||||
per-level: 0.2
|
||||
per-level: 1.2
|
||||
|
@ -10,13 +10,13 @@ lore:
|
||||
material: MAGENTA_DYE
|
||||
duration:
|
||||
base: 2.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
mana:
|
||||
base: 15.0
|
||||
per-level: 1.5
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
|
@ -14,8 +14,8 @@ mana:
|
||||
base: 8.0
|
||||
per-level: 3.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
extra:
|
||||
|
@ -12,8 +12,8 @@ mana:
|
||||
base: 4.0
|
||||
per-level: 1.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
extra:
|
||||
@ -26,7 +26,7 @@ cooldown:
|
||||
min: 5.0
|
||||
radius:
|
||||
base: 4.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
ratio:
|
||||
base: 30.0
|
||||
per-level: 10.0
|
||||
|
@ -8,17 +8,17 @@ lore:
|
||||
material: LEATHER_BOOTS
|
||||
duration:
|
||||
base: 2.0
|
||||
per-level: 0.3
|
||||
per-level: 1.3
|
||||
max: 10.0
|
||||
min: 2.0
|
||||
mana:
|
||||
base: 8.0
|
||||
per-level: 3.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
base: 20.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
|
@ -3,13 +3,13 @@ lore:
|
||||
- You deal &c{extra}% &7more damage when on fire.
|
||||
material: FLINT_AND_STEEL
|
||||
mana:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
extra:
|
||||
|
@ -10,24 +10,24 @@ lore:
|
||||
material: FIRE_CHARGE
|
||||
duration:
|
||||
base: 8.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
damage:
|
||||
base: 5.0
|
||||
per-level: 3.0
|
||||
ignite:
|
||||
base: 2.0
|
||||
per-level: 0.1
|
||||
per-level: 1.1
|
||||
mana:
|
||||
base: 15.0
|
||||
per-level: 1.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
count:
|
||||
base: 4.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
cooldown:
|
||||
base: 9.0
|
||||
per-level: -0.1
|
||||
|
@ -13,13 +13,13 @@ damage:
|
||||
per-level: 3.0
|
||||
ignite:
|
||||
base: 2.0
|
||||
per-level: 0.1
|
||||
per-level: 1.1
|
||||
mana:
|
||||
base: 15.0
|
||||
per-level: 2.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
|
@ -16,13 +16,13 @@ damage:
|
||||
per-level: 3.0
|
||||
ignite:
|
||||
base: 2.0
|
||||
per-level: 0.1
|
||||
per-level: 1.1
|
||||
mana:
|
||||
base: 15.0
|
||||
per-level: 1.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
|
@ -13,8 +13,8 @@ mana:
|
||||
base: 8.0
|
||||
per-level: 3.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
extra:
|
||||
@ -27,4 +27,4 @@ cooldown:
|
||||
min: 5.0
|
||||
radius:
|
||||
base: 7.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
|
@ -10,8 +10,8 @@ mana:
|
||||
base: 4.0
|
||||
per-level: 2.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
heal:
|
||||
|
@ -16,16 +16,16 @@ redirect:
|
||||
min: 20.0
|
||||
duration:
|
||||
base: 7.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
mana:
|
||||
base: 15.0
|
||||
per-level: 1.5
|
||||
low:
|
||||
base: 10.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
|
@ -16,10 +16,10 @@ mana:
|
||||
per-level: 2.0
|
||||
slow:
|
||||
base: 4.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
|
@ -10,8 +10,8 @@ mana:
|
||||
base: 4.0
|
||||
per-level: 2.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
heal:
|
||||
|
@ -16,23 +16,23 @@ lore:
|
||||
material: WITHER_SKELETON_SKULL
|
||||
duration:
|
||||
base: 10.0
|
||||
per-level: 0.1
|
||||
per-level: 1.1
|
||||
mana:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
base: 30.0
|
||||
per-level: 0.0
|
||||
per-level: 1.0
|
||||
stun:
|
||||
base: 0.4
|
||||
per-level: 0.03
|
||||
base: 2.4
|
||||
per-level: 1.03
|
||||
ratio:
|
||||
base: 10.0
|
||||
per-level: 5.0
|
||||
|
@ -9,13 +9,13 @@ mana:
|
||||
base: 8.0
|
||||
per-level: 1.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
extra:
|
||||
base: 50.0
|
||||
per-level: 20.0
|
||||
cooldown:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
|
@ -9,15 +9,15 @@ lore:
|
||||
material: MAGENTA_DYE
|
||||
duration:
|
||||
base: 3.0
|
||||
per-level: 0.1
|
||||
per-level: 1.1
|
||||
max: 6.0
|
||||
min: 3.0
|
||||
mana:
|
||||
base: 20.0
|
||||
per-level: 2.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
|
@ -10,8 +10,8 @@ mana:
|
||||
base: 8.0
|
||||
per-level: 3.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
|
@ -16,8 +16,8 @@ mana:
|
||||
base: 4.0
|
||||
per-level: 1.0
|
||||
stamina:
|
||||
base: 0.0
|
||||
per-level: 0.0
|
||||
base: 2.0
|
||||
per-level: 1.0
|
||||
max: 0.0
|
||||
min: 0.0
|
||||
cooldown:
|
||||
|
@ -13,7 +13,7 @@ And then add MMOCore-API as dependency
|
||||
<dependency>
|
||||
<groupId>net.Indyuce</groupId>
|
||||
<artifactId>MMOCore-API</artifactId>
|
||||
<version>1.11.2-SNAPSHOT</version>
|
||||
<version>1.11.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
@ -3,3 +3,5 @@ files:
|
||||
translation: /**/MMOCore-Dist/src/main/resources/default/translation/%language%/gui/%file_name%.%file_extension%
|
||||
- source: MMOCore-Dist/src/main/resources/default/messages.yml
|
||||
translation: /**/MMOCore-Dist/src/main/resources/default/translation/%language%/%file_name%.%file_extension%
|
||||
- source: MMOCore-Dist/src/main/resources/default/gui/class-confirm/*.yml
|
||||
translation: /**/MMOCore-Dist/src/main/resources/default/translation/%language%/gui/class-confirm/%file_name%.%file_extension%
|
||||
|
Loading…
Reference in New Issue
Block a user