mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-29 16:15:17 +01:00
Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
fe5fbd4424
@ -67,6 +67,11 @@ public class CommandRandomenchant extends AbstractCommand {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.getPlugin().getConfigYml().getBool("anvil.hard-cap.enabled")
|
||||
&& !player.hasPermission("ecoenchants.randomenchant.bypasshardcap")
|
||||
&& onItem.size() >= this.getPlugin().getConfigYml().getInt("anvil.hard-cap.cap")) {
|
||||
conflicts = true;
|
||||
}
|
||||
if (!conflicts) {
|
||||
enchant = ecoEnchant;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public class InfernalTouch extends EcoEnchant {
|
||||
experience += out.getSecond();
|
||||
|
||||
if (fortune > 0 && FORTUNE_MATERIALS.contains(itemStack.getType())) {
|
||||
itemStack.setAmount((int) Math.ceil(1 / ((double) fortune + 2) + ((double) fortune + 1) / 2));
|
||||
itemStack.setAmount((int) Math.round((Math.random() * ((double) fortune - 1)) + 1.1));
|
||||
experience++;
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ permissions:
|
||||
ecoenchants.enchantinfo: true
|
||||
ecoenchants.ecodebug: true
|
||||
ecoenchants.randomenchant: true
|
||||
ecoenchants.randomenchant.bypasshardcap: true
|
||||
ecoenchants.anvil.*: true
|
||||
ecoenchants.anvil.*:
|
||||
description: Allows all anvil permissions
|
||||
@ -74,6 +75,9 @@ permissions:
|
||||
ecoenchants.randomenchant:
|
||||
description: Allows the use of /randomenchant to apply a random enchantment to an item
|
||||
default: op
|
||||
ecoenchants.randomenchant.bypasshardcap:
|
||||
description: Allows /randomenchant bypassing the anvil hard cap
|
||||
default: op
|
||||
ecoenchants.anvil.bypasshardcap:
|
||||
description: Allows bypassing the anvil hard cap
|
||||
default: op
|
||||
|
@ -3,6 +3,18 @@ package com.willfp.ecoenchants.mmo;
|
||||
import com.willfp.eco.util.extensions.Extension;
|
||||
import com.willfp.eco.util.plugin.AbstractEcoPlugin;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.mmo.enchants.abilities.Discounted;
|
||||
import com.willfp.ecoenchants.mmo.enchants.abilities.Recover;
|
||||
import com.willfp.ecoenchants.mmo.enchants.mana.Augment;
|
||||
import com.willfp.ecoenchants.mmo.enchants.mana.Drain;
|
||||
import com.willfp.ecoenchants.mmo.enchants.mana.Elixir;
|
||||
import com.willfp.ecoenchants.mmo.enchants.mana.Siphon;
|
||||
import com.willfp.ecoenchants.mmo.enchants.mana.Spirituality;
|
||||
import com.willfp.ecoenchants.mmo.enchants.misc.Strengthening;
|
||||
import com.willfp.ecoenchants.mmo.enchants.stamina.Athletic;
|
||||
import com.willfp.ecoenchants.mmo.enchants.stamina.Endurance;
|
||||
import com.willfp.ecoenchants.mmo.enchants.stamina.Fortitude;
|
||||
import com.willfp.ecoenchants.mmo.enchants.stamina.Motivate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.integrations.mmo.MMOManager;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import com.willfp.ecoenchants.proxy.proxies.CooldownProxy;
|
||||
import com.willfp.ecoenchants.util.ProxyUtils;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
|
@ -3,6 +3,11 @@ package com.willfp.ecoenchants.mmo.enchants.misc;
|
||||
import com.willfp.eco.util.events.armorequip.ArmorEquipEvent;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import net.mmogroup.mmolib.MMOLib;
|
||||
import net.mmogroup.mmolib.api.player.MMOPlayerData;
|
||||
import net.mmogroup.mmolib.api.stat.SharedStat;
|
||||
import net.mmogroup.mmolib.api.stat.modifier.StatModifier;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class Strengthening extends MMOEnchantment {
|
||||
|
@ -5,6 +5,7 @@ import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.integrations.mmo.MMOManager;
|
||||
import com.willfp.ecoenchants.mmo.structure.MMOEnchantment;
|
||||
import com.willfp.ecoenchants.proxy.proxies.CooldownProxy;
|
||||
import com.willfp.ecoenchants.util.ProxyUtils;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
|
@ -3,6 +3,7 @@ package com.willfp.ecoenchants.mmo.structure;
|
||||
import com.willfp.eco.util.optional.Prerequisite;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import com.willfp.ecoenchants.mmo.MMOPrerequisites;
|
||||
|
||||
public abstract class MMOEnchantment extends EcoEnchant implements MMOEnchant {
|
||||
protected MMOEnchantment(String key, EnchantmentType type, Prerequisite... prerequisites) {
|
||||
|
Loading…
Reference in New Issue
Block a user