Merge remote-tracking branch 'origin/master'

# Conflicts:
#	MMOCore-API/src/main/java/net/Indyuce/mmocore/party/MMOCoreTargetRestriction.java
This commit is contained in:
Jules 2023-01-27 19:29:49 +01:00
commit c720e73f90
4 changed files with 15 additions and 8 deletions

View File

@ -6,6 +6,7 @@ import net.Indyuce.mmocore.gui.api.adaptor.ClassicAdaptor;
import net.Indyuce.mmocore.gui.api.item.InventoryItem;
import net.Indyuce.mmocore.gui.api.item.TriggerItem;
import org.apache.commons.lang.Validate;
import org.bukkit.Material;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
@ -87,7 +88,8 @@ public abstract class GeneratedInventory extends PluginInventory {
public void whenClicked(InventoryClickContext context) {
context.setCancelled(true);
InventoryItem item = getBySlot(context.getSlot());
if (item == null)
//Checks that the click corresponds to a GUI Item.
if (item == null || context.getClickedItem() == null || context.getClickedItem().getType() == Material.AIR)
return;
if (item instanceof TriggerItem)

View File

@ -43,13 +43,14 @@ public class CastableSkill extends Skill {
// Cooldown check
if (skillMeta.getCaster().getData().getCooldownMap().isOnCooldown(this)) {
if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.on-cooldown").send(playerData.getPlayer());
if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.on-cooldown",
"cooldown",MythicLib.plugin.getMMOConfig().decimal.format(skillMeta.getCaster().getData().getCooldownMap().getCooldown(this))).send(playerData.getPlayer());
return false;
}
// Mana cost
if (playerData.getMana() < getModifier("mana")) {
if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.no-mana", "mana", playerData.getProfess().getManaDisplay().getName()).send(playerData.getPlayer());
if (loud) MMOCore.plugin.configManager.getSimpleMessage("casting.no-mana", "mana-required",MythicLib.plugin.getMMOConfig().decimal.format((getModifier("mana")-playerData.getMana())),"mana", playerData.getProfess().getManaDisplay().getName()).send(playerData.getPlayer());
return false;
}

View File

@ -1,4 +1,3 @@
# Level & Experience
level-up:
- ''
@ -68,9 +67,9 @@ casting:
no-stamina: '&6[{index}] &9&l{skill}'
split: '&7 &7 - &7 '
no-longer: '%&cYou cancelled skill casting.'
no-mana: '&cYou do not have enough {mana}!'
no-mana: '&cYou do not have enough {mana}, {mana-required} more required!'
no-stamina: '&cYou do not have enough stamina!'
on-cooldown: '&cThis skill is on cooldown.'
on-cooldown: '&cThis skill is on a {cooldown} cooldown.'
# Combat Log
now-in-combat: '%&cYou are now in combat!'
@ -189,7 +188,7 @@ skill-max-level-hit: '&cYou already hit the max level for that skill.'
no-skill-placeholder: 'No Skill Bound'
not-skill-reallocation-point: '&cYou do not have 1 skill reallocation point.'
no-skill-points-spent: '&cYou have not spent any skill points.'
skill-points-reallocated: '&eYou successfully reset your attributes. You now have &6{points} &eskill points.'
skill-points-reallocated: '&eYou successfully reset your skill points. You now have &6{points} &eskill points.'
max-points-reached: '&cYou reached the maximum points you can spend. You need to reallocate your points to rollback.'
# Skill Trees

5
crowdin.yml Normal file
View File

@ -0,0 +1,5 @@
files:
- source: MMOCore-Dist/src/main/resources/default/gui/*.yml
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%