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:
Jules 2023-04-04 13:04:44 +02:00
commit c94795fc89
40 changed files with 407 additions and 145 deletions

View File

@ -341,7 +341,6 @@ public class MMOCore extends JavaPlugin {
statManager.initialize(clearBefore); statManager.initialize(clearBefore);
professionManager.initialize(clearBefore); professionManager.initialize(clearBefore);
InventoryManager.load();
skillTreeManager.initialize(clearBefore); skillTreeManager.initialize(clearBefore);
classManager.initialize(clearBefore); classManager.initialize(clearBefore);
questManager.initialize(clearBefore); questManager.initialize(clearBefore);
@ -351,6 +350,8 @@ public class MMOCore extends JavaPlugin {
requestManager.initialize(clearBefore); requestManager.initialize(clearBefore);
soundManager.initialize(clearBefore); soundManager.initialize(clearBefore);
configItems.initialize(clearBefore); configItems.initialize(clearBefore);
//Needs to be loaded after the class manager.
InventoryManager.load();
if (getConfig().isConfigurationSection("action-bar")) if (getConfig().isConfigurationSection("action-bar"))
actionBarManager.reload(getConfig().getConfigurationSection("action-bar")); actionBarManager.reload(getConfig().getConfigurationSection("action-bar"));

View File

@ -851,6 +851,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
new ConfigMessage("level-up").addPlaceholders("level", String.valueOf(level)).send(getPlayer()); new ConfigMessage("level-up").addPlaceholders("level", String.valueOf(level)).send(getPlayer());
MMOCore.plugin.soundManager.getSound(SoundEvent.LEVEL_UP).playTo(getPlayer()); MMOCore.plugin.soundManager.getSound(SoundEvent.LEVEL_UP).playTo(getPlayer());
new SmallParticleEffect(getPlayer(), Particle.SPELL_INSTANT); new SmallParticleEffect(getPlayer(), Particle.SPELL_INSTANT);
//TEST
} }
getStats().updateStats(); getStats().updateStats();
} }
@ -950,7 +951,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
@Override @Override
public double getHealth() { public double getHealth() {
return health; return isOnline() ? getPlayer().getHealth():health ;
} }
@Override @Override

View File

@ -300,6 +300,8 @@ public class SavedClassInformation {
player.setMana(mana); player.setMana(mana);
player.setStellium(stellium); player.setStellium(stellium);
player.setStamina(stamina); 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())); player.getPlayer().setHealth(Math.min(health,player.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
// Updates level on exp bar // Updates level on exp bar
player.refreshVanillaExp(); player.refreshVanillaExp();

View File

@ -47,8 +47,6 @@ public class QuestProgress {
objective++; objective++;
objectiveProgress.close(); objectiveProgress.close();
// apply triggers
objectiveProgress.getObjective().getTriggers().forEach(trigger -> trigger.schedule(getPlayer()));
// end quest // end quest
if (objective >= quest.getObjectives().size()) if (objective >= quest.getObjectives().size())
@ -57,6 +55,10 @@ public class QuestProgress {
objectiveProgress = nextObjective().newProgress(this); objectiveProgress = nextObjective().newProgress(this);
player.getQuestData().updateBossBar(); 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() { public String getFormattedLore() {

View File

@ -1,6 +1,7 @@
package net.Indyuce.mmocore.comp.placeholder; package net.Indyuce.mmocore.comp.placeholder;
import io.lumine.mythic.lib.MythicLib; 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.api.util.AltChar;
import io.lumine.mythic.lib.manager.StatManager; import io.lumine.mythic.lib.manager.StatManager;
import me.clip.placeholderapi.expansion.PlaceholderExpansion; import me.clip.placeholderapi.expansion.PlaceholderExpansion;
@ -183,8 +184,8 @@ public class RPGPlaceholders extends PlaceholderExpansion {
} }
else if (identifier.startsWith("stat_")) { else if (identifier.startsWith("stat_")) {
final String stat = identifier.substring(5).toUpperCase(); final String stat = UtilityMethods.enumName(identifier.substring(5));
return StatManager.format(identifier.substring(5), playerData.getStats().getStat(stat)); return StatManager.format(stat, playerData.getMMOPlayerData());
} }
else if (identifier.equals("stellium")) else if (identifier.equals("stellium"))

View File

@ -1,12 +1,12 @@
package net.Indyuce.mmocore.gui; package net.Indyuce.mmocore.gui;
import io.lumine.mythic.lib.UtilityMethods;
import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.SoundEvent; import net.Indyuce.mmocore.api.SoundEvent;
import net.Indyuce.mmocore.api.event.PlayerChangeClassEvent; import net.Indyuce.mmocore.api.event.PlayerChangeClassEvent;
import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.player.profess.PlayerClass; import net.Indyuce.mmocore.api.player.profess.PlayerClass;
import net.Indyuce.mmocore.api.player.profess.SavedClassInformation; 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.EditableInventory;
import net.Indyuce.mmocore.gui.api.GeneratedInventory; import net.Indyuce.mmocore.gui.api.GeneratedInventory;
import net.Indyuce.mmocore.gui.api.InventoryClickContext; import net.Indyuce.mmocore.gui.api.InventoryClickContext;
@ -21,21 +21,14 @@ import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.Nullable;
import java.util.HashMap;
import java.util.Map;
public class ClassConfirmation extends EditableInventory { public class ClassConfirmation extends EditableInventory {
/** private final PlayerClass playerClass;
* This enables to configure the name of the
* class confirmation GUI (for custom GUI textures).
*/
private final Map<String, String> specificNames = new HashMap<>();
public ClassConfirmation() { public ClassConfirmation(PlayerClass playerClass) {
super("class-confirm"); super("class-confirm-"+ UtilityMethods.ymlName(playerClass.getId()));
this.playerClass=playerClass;
} }
@Override @Override
@ -43,21 +36,13 @@ public class ClassConfirmation extends EditableInventory {
return function.equalsIgnoreCase("yes") ? new YesItem(config) : new SimplePlaceholderItem(config); return function.equalsIgnoreCase("yes") ? new YesItem(config) : new SimplePlaceholderItem(config);
} }
public GeneratedInventory newInventory(PlayerData data, PlayerClass profess, PluginInventory last) { public GeneratedInventory newInventory(PlayerData data, PluginInventory last) {
return new ClassConfirmationInventory(data, this, profess, last); return new ClassConfirmationInventory(data, this, playerClass, last);
} }
@Override @Override
public void reload(FileConfiguration config) { public void reload(FileConfiguration config) {
super.reload(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> { public class UnlockedItem extends InventoryItem<ClassConfirmationInventory> {
@ -154,9 +139,7 @@ public class ClassConfirmation extends EditableInventory {
@Override @Override
public String calculateName() { public String calculateName() {
final String professKey = MMOCoreUtils.ymlName(profess.getId()); return getName().replace("{class}", profess.getName());
final @Nullable String found = specificNames.get(professKey);
return found == null ? getName().replace("{class}", profess.getName()) : found;
} }
} }
} }

View File

@ -1,18 +1,21 @@
package net.Indyuce.mmocore.gui; package net.Indyuce.mmocore.gui;
import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.MMOCore;
import net.Indyuce.mmocore.api.ConfigMessage; import net.Indyuce.mmocore.api.ConfigMessage;
import net.Indyuce.mmocore.api.SoundEvent; import net.Indyuce.mmocore.api.SoundEvent;
import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.player.PlayerData;
import net.Indyuce.mmocore.api.player.profess.ClassOption; import net.Indyuce.mmocore.api.player.profess.ClassOption;
import net.Indyuce.mmocore.api.player.profess.PlayerClass; 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.EditableInventory;
import net.Indyuce.mmocore.gui.api.GeneratedInventory; import net.Indyuce.mmocore.gui.api.GeneratedInventory;
import net.Indyuce.mmocore.gui.api.InventoryClickContext; import net.Indyuce.mmocore.gui.api.InventoryClickContext;
import net.Indyuce.mmocore.gui.api.item.InventoryItem; import net.Indyuce.mmocore.gui.api.item.InventoryItem;
import net.Indyuce.mmocore.gui.api.item.SimplePlaceholderItem; import net.Indyuce.mmocore.gui.api.item.SimplePlaceholderItem;
import net.Indyuce.mmocore.manager.InventoryManager; import net.Indyuce.mmocore.manager.InventoryManager;
import org.apache.commons.lang.Validate;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.NamespacedKey; import org.bukkit.NamespacedKey;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
@ -24,6 +27,7 @@ import org.bukkit.persistence.PersistentDataType;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
public class ClassSelect extends EditableInventory { public class ClassSelect extends EditableInventory {
@ -33,7 +37,7 @@ public class ClassSelect extends EditableInventory {
@Override @Override
public InventoryItem load(String function, ConfigurationSection config) { 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) { public GeneratedInventory newInventory(PlayerData data) {
@ -43,10 +47,13 @@ public class ClassSelect extends EditableInventory {
public class ClassItem extends SimplePlaceholderItem<ProfessSelectionInventory> { public class ClassItem extends SimplePlaceholderItem<ProfessSelectionInventory> {
private final String name; private final String name;
private final List<String> lore; private final List<String> lore;
private final PlayerClass playerClass;
public ClassItem(ConfigurationSection config) { public ClassItem(ConfigurationSection config) {
super(Material.BARRIER, 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.name = config.getString("name");
this.lore = config.getStringList("lore"); this.lore = config.getStringList("lore");
} }
@ -60,29 +67,28 @@ public class ClassSelect extends EditableInventory {
if (n >= inv.classes.size()) if (n >= inv.classes.size())
return null; return null;
PlayerClass profess = inv.classes.get(n); ItemStack item = playerClass.getIcon();
ItemStack item = profess.getIcon();
ItemMeta meta = item.getItemMeta(); ItemMeta meta = item.getItemMeta();
if (hideFlags()) if (hideFlags())
meta.addItemFlags(ItemFlag.values()); 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); List<String> lore = new ArrayList<>(this.lore);
int index = lore.indexOf("{lore}"); int index = lore.indexOf("{lore}");
if (index >= 0) { if (index >= 0) {
lore.remove(index); lore.remove(index);
for (int j = 0; j < profess.getDescription().size(); j++) for (int j = 0; j < playerClass.getDescription().size(); j++)
lore.add(index + j, profess.getDescription().get(j)); lore.add(index + j, playerClass.getDescription().get(j));
} }
index = lore.indexOf("{attribute-lore}"); index = lore.indexOf("{attribute-lore}");
if (index >= 0) { if (index >= 0) {
lore.remove(index); lore.remove(index);
for (int j = 0; j < profess.getAttributeDescription().size(); j++) for (int j = 0; j < playerClass.getAttributeDescription().size(); j++)
lore.add(index + j, profess.getAttributeDescription().get(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); meta.setLore(lore);
item.setItemMeta(meta); item.setItemMeta(meta);
return item; return item;
@ -104,10 +110,8 @@ public class ClassSelect extends EditableInventory {
@Override @Override
public void whenClicked(InventoryClickContext context, InventoryItem item) { public void whenClicked(InventoryClickContext context, InventoryItem item) {
if (item.getFunction().equals("class")) { if (item instanceof ClassItem) {
String classId = context.getClickedItem().getItemMeta().getPersistentDataContainer().get(new NamespacedKey(MMOCore.plugin, "class_id"), PersistentDataType.STRING); PlayerClass profess = ((ClassItem) item).playerClass;
if (classId.equals(""))
return;
if (playerData.getClassPoints() < 1) { if (playerData.getClassPoints() < 1) {
MMOCore.plugin.soundManager.getSound(SoundEvent.CANT_SELECT_CLASS).playTo(player); MMOCore.plugin.soundManager.getSound(SoundEvent.CANT_SELECT_CLASS).playTo(player);
@ -115,7 +119,6 @@ public class ClassSelect extends EditableInventory {
return; return;
} }
final PlayerClass profess = MMOCore.plugin.classManager.get(classId);
if (profess.hasOption(ClassOption.NEEDS_PERMISSION) && !player.hasPermission("mmocore.class." + profess.getId().toLowerCase())) { if (profess.hasOption(ClassOption.NEEDS_PERMISSION) && !player.hasPermission("mmocore.class." + profess.getId().toLowerCase())) {
MMOCore.plugin.soundManager.getSound(SoundEvent.CANT_SELECT_CLASS).playTo(player); MMOCore.plugin.soundManager.getSound(SoundEvent.CANT_SELECT_CLASS).playTo(player);
new ConfigMessage("no-permission-for-class").send(player); new ConfigMessage("no-permission-for-class").send(player);
@ -129,7 +132,7 @@ public class ClassSelect extends EditableInventory {
} }
final PlayerClass playerClass = findDeepestSubclass(playerData, profess); 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();
} }
} }
} }

View File

@ -1,10 +1,11 @@
package net.Indyuce.mmocore.manager; package net.Indyuce.mmocore.manager;
import java.util.Arrays; import java.util.*;
import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import net.Indyuce.mmocore.MMOCore; 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.social.friend.EditableFriendList;
import net.Indyuce.mmocore.gui.*; import net.Indyuce.mmocore.gui.*;
import net.Indyuce.mmocore.gui.social.friend.EditableFriendRemoval; 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 SkillList SKILL_LIST = new SkillList();
public static final ClassSelect CLASS_SELECT = new ClassSelect(); public static final ClassSelect CLASS_SELECT = new ClassSelect();
public static final SubclassSelect SUBCLASS_SELECT = new SubclassSelect(); 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 SubclassConfirmation SUBCLASS_CONFIRM = new SubclassConfirmation();
public static final WaypointViewer WAYPOINTS = new WaypointViewer(); public static final WaypointViewer WAYPOINTS = new WaypointViewer();
public static final EditableFriendList FRIEND_LIST = new EditableFriendList(); 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 QuestViewer QUEST_LIST = new QuestViewer();
public static final AttributeView ATTRIBUTE_VIEW = new AttributeView(); public static final AttributeView ATTRIBUTE_VIEW = new AttributeView();
public static final SkillTreeViewer TREE_VIEW = new SkillTreeViewer(); 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() { 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 -> { list.forEach(inv -> {
MMOCore.plugin.configManager.loadDefaultFile("gui", inv.getId() + ".yml"); String folder="gui"+(inv instanceof ClassConfirmation?"/class-confirm":"");
try { try {
inv.reload(new ConfigFile("/gui", inv.getId()).getConfig()); MMOCore.plugin.configManager.loadDefaultFile(folder, inv.getId() + ".yml");
} catch (IllegalArgumentException exception) { inv.reload(new ConfigFile("/"+folder, inv.getId()).getConfig());
MMOCore.log(Level.WARNING, "Could not load inventory '" + inv.getId() + "': " + exception.getMessage()); } catch (Exception exception) {
MMOCore.log(Level.WARNING, "Could not load inventory '" +(inv instanceof ClassConfirmation?"class-confirm/":""+ inv.getId() + "': " + exception.getMessage()));
} }
}); });
} }

View File

@ -124,8 +124,8 @@ public class YAMLPlayerDataManager extends PlayerDataManager {
data.setStamina(config.contains("stamina") ? config.getDouble("stamina") : data.getStats().getStat("MAX_STAMINA")); 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")); 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"); 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 = health == 0 ? 20 : health;
health = Math.max(Math.min(health, data.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()), 0); health = Math.min(health, data.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
data.getPlayer().setHealth(health); data.getPlayer().setHealth(health);
data.setFullyLoaded(); data.setFullyLoaded();

View File

@ -1,16 +1,6 @@
# GUI display name, used by default # GUI display name, used by default
name: 'Confirmation: {class}' 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 # Number of slots in your inventory. Must be
# between 9 and 54 and must be a multiple of 9. # between 9 and 54 and must be a multiple of 9.
slots: 27 slots: 27

View File

@ -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: {}

View File

@ -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: {}

View File

@ -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: {}

View File

@ -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: {}

View File

@ -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: {}

View File

@ -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: {}

View File

@ -7,10 +7,51 @@ name: Class Selection
slots: 27 slots: 27
items: items:
class:
slots: [13,12,14,11,15,10,16] class-rogue:
function: class slots: [11]
name: '&a&lThe {name}' 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 hide-flags: true
lore: lore:
- '{lore}' - '{lore}'

View File

@ -12,13 +12,13 @@ lore:
- '&e{cooldown}s Cooldown' - '&e{cooldown}s Cooldown'
material: EMERALD material: EMERALD
mana: mana:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:
@ -28,6 +28,6 @@ cooldown:
min: 1.0 min: 1.0
percent: percent:
base: 10.0 base: 10.0
per-level: 0.1 per-level: 1.1
max: 20.0 max: 20.0
min: 10.0 min: 10.0

View File

@ -8,13 +8,13 @@ mana:
base: 8.0 base: 8.0
per-level: 1.0 per-level: 1.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
extra: extra:
base: 50.0 base: 50.0
per-level: 20.0 per-level: 20.0
cooldown: cooldown:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0

View File

@ -8,15 +8,15 @@ lore:
material: IRON_SWORD material: IRON_SWORD
damage: damage:
base: 9.0 base: 9.0
per-level: 0.3 per-level: 1.3
mana: mana:
base: 10.0 base: 10.0
per-level: -0.1 per-level: -0.1
max: 5.0 max: 5.0
min: 3.0 min: 3.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:
@ -26,4 +26,4 @@ cooldown:
min: 5.0 min: 5.0
count: count:
base: 3.0 base: 3.0
per-level: 0.2 per-level: 1.2

View File

@ -10,13 +10,13 @@ lore:
material: MAGENTA_DYE material: MAGENTA_DYE
duration: duration:
base: 2.0 base: 2.0
per-level: 0.0 per-level: 1.0
mana: mana:
base: 15.0 base: 15.0
per-level: 1.5 per-level: 1.5
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:

View File

@ -14,8 +14,8 @@ mana:
base: 8.0 base: 8.0
per-level: 3.0 per-level: 3.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
extra: extra:

View File

@ -12,8 +12,8 @@ mana:
base: 4.0 base: 4.0
per-level: 1.0 per-level: 1.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
extra: extra:
@ -26,7 +26,7 @@ cooldown:
min: 5.0 min: 5.0
radius: radius:
base: 4.0 base: 4.0
per-level: 0.0 per-level: 1.0
ratio: ratio:
base: 30.0 base: 30.0
per-level: 10.0 per-level: 10.0

View File

@ -8,17 +8,17 @@ lore:
material: LEATHER_BOOTS material: LEATHER_BOOTS
duration: duration:
base: 2.0 base: 2.0
per-level: 0.3 per-level: 1.3
max: 10.0 max: 10.0
min: 2.0 min: 2.0
mana: mana:
base: 8.0 base: 8.0
per-level: 3.0 per-level: 3.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:
base: 20.0 base: 20.0
per-level: 0.0 per-level: 1.0

View File

@ -3,13 +3,13 @@ lore:
- You deal &c{extra}% &7more damage when on fire. - You deal &c{extra}% &7more damage when on fire.
material: FLINT_AND_STEEL material: FLINT_AND_STEEL
mana: mana:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
extra: extra:

View File

@ -10,24 +10,24 @@ lore:
material: FIRE_CHARGE material: FIRE_CHARGE
duration: duration:
base: 8.0 base: 8.0
per-level: 0.0 per-level: 1.0
damage: damage:
base: 5.0 base: 5.0
per-level: 3.0 per-level: 3.0
ignite: ignite:
base: 2.0 base: 2.0
per-level: 0.1 per-level: 1.1
mana: mana:
base: 15.0 base: 15.0
per-level: 1.0 per-level: 1.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
count: count:
base: 4.0 base: 4.0
per-level: 0.0 per-level: 1.0
cooldown: cooldown:
base: 9.0 base: 9.0
per-level: -0.1 per-level: -0.1

View File

@ -13,13 +13,13 @@ damage:
per-level: 3.0 per-level: 3.0
ignite: ignite:
base: 2.0 base: 2.0
per-level: 0.1 per-level: 1.1
mana: mana:
base: 15.0 base: 15.0
per-level: 2.0 per-level: 2.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:

View File

@ -16,13 +16,13 @@ damage:
per-level: 3.0 per-level: 3.0
ignite: ignite:
base: 2.0 base: 2.0
per-level: 0.1 per-level: 1.1
mana: mana:
base: 15.0 base: 15.0
per-level: 1.0 per-level: 1.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:

View File

@ -13,8 +13,8 @@ mana:
base: 8.0 base: 8.0
per-level: 3.0 per-level: 3.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
extra: extra:
@ -27,4 +27,4 @@ cooldown:
min: 5.0 min: 5.0
radius: radius:
base: 7.0 base: 7.0
per-level: 0.0 per-level: 1.0

View File

@ -10,8 +10,8 @@ mana:
base: 4.0 base: 4.0
per-level: 2.0 per-level: 2.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
heal: heal:

View File

@ -16,16 +16,16 @@ redirect:
min: 20.0 min: 20.0
duration: duration:
base: 7.0 base: 7.0
per-level: 0.0 per-level: 1.0
mana: mana:
base: 15.0 base: 15.0
per-level: 1.5 per-level: 1.5
low: low:
base: 10.0 base: 10.0
per-level: 0.0 per-level: 1.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:

View File

@ -16,10 +16,10 @@ mana:
per-level: 2.0 per-level: 2.0
slow: slow:
base: 4.0 base: 4.0
per-level: 0.0 per-level: 1.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:

View File

@ -10,8 +10,8 @@ mana:
base: 4.0 base: 4.0
per-level: 2.0 per-level: 2.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
heal: heal:

View File

@ -16,23 +16,23 @@ lore:
material: WITHER_SKELETON_SKULL material: WITHER_SKELETON_SKULL
duration: duration:
base: 10.0 base: 10.0
per-level: 0.1 per-level: 1.1
mana: mana:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:
base: 30.0 base: 30.0
per-level: 0.0 per-level: 1.0
stun: stun:
base: 0.4 base: 2.4
per-level: 0.03 per-level: 1.03
ratio: ratio:
base: 10.0 base: 10.0
per-level: 5.0 per-level: 5.0

View File

@ -9,13 +9,13 @@ mana:
base: 8.0 base: 8.0
per-level: 1.0 per-level: 1.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
extra: extra:
base: 50.0 base: 50.0
per-level: 20.0 per-level: 20.0
cooldown: cooldown:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0

View File

@ -9,15 +9,15 @@ lore:
material: MAGENTA_DYE material: MAGENTA_DYE
duration: duration:
base: 3.0 base: 3.0
per-level: 0.1 per-level: 1.1
max: 6.0 max: 6.0
min: 3.0 min: 3.0
mana: mana:
base: 20.0 base: 20.0
per-level: 2.0 per-level: 2.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:

View File

@ -10,8 +10,8 @@ mana:
base: 8.0 base: 8.0
per-level: 3.0 per-level: 3.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:

View File

@ -16,8 +16,8 @@ mana:
base: 4.0 base: 4.0
per-level: 1.0 per-level: 1.0
stamina: stamina:
base: 0.0 base: 2.0
per-level: 0.0 per-level: 1.0
max: 0.0 max: 0.0
min: 0.0 min: 0.0
cooldown: cooldown:

View File

@ -13,7 +13,7 @@ And then add MMOCore-API as dependency
<dependency> <dependency>
<groupId>net.Indyuce</groupId> <groupId>net.Indyuce</groupId>
<artifactId>MMOCore-API</artifactId> <artifactId>MMOCore-API</artifactId>
<version>1.11.2-SNAPSHOT</version> <version>1.11.3-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
``` ```

View File

@ -3,3 +3,5 @@ files:
translation: /**/MMOCore-Dist/src/main/resources/default/translation/%language%/gui/%file_name%.%file_extension% translation: /**/MMOCore-Dist/src/main/resources/default/translation/%language%/gui/%file_name%.%file_extension%
- source: MMOCore-Dist/src/main/resources/default/messages.yml - source: MMOCore-Dist/src/main/resources/default/messages.yml
translation: /**/MMOCore-Dist/src/main/resources/default/translation/%language%/%file_name%.%file_extension% 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%