mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
parent
63b332216e
commit
a5bc547c40
@ -802,6 +802,9 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
|||||||
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
public int getSmeltingVanillaXPBoostMultiplier(Smelting.Tier tier) { return config.getInt("Skills.Smelting.VanillaXPMultiplier.Rank_" + tier.toNumerical()); }
|
||||||
|
|
||||||
/* SWORDS */
|
/* SWORDS */
|
||||||
|
public double getBleedDamagePlayer() { return config.getDouble("Skills.Swords.Bleed.Damage_Player", 1.0); }
|
||||||
|
public double getBleedDamageMobs() { return config.getDouble("Skills.Swords.Bleed.Damage_Mobs", 2.0); }
|
||||||
|
|
||||||
public int getBleedMaxTicks() { return config.getInt("Skills.Swords.Bleed.MaxTicks", 3); }
|
public int getBleedMaxTicks() { return config.getInt("Skills.Swords.Bleed.MaxTicks", 3); }
|
||||||
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
public int getBleedBaseTicks() { return config.getInt("Skills.Swords.Bleed.BaseTicks", 2); }
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import org.bukkit.entity.LivingEntity;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
import com.gmail.nossr50.config.AdvancedConfig;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
import com.gmail.nossr50.util.skills.CombatUtils;
|
||||||
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
import com.gmail.nossr50.util.skills.ParticleEffectUtils;
|
||||||
@ -28,10 +29,10 @@ public class BleedTimerTask extends BukkitRunnable {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int damage;
|
double damage;
|
||||||
|
|
||||||
if (entity instanceof Player) {
|
if (entity instanceof Player) {
|
||||||
damage = 1;
|
damage = AdvancedConfig.getInstance().getBleedDamagePlayer();
|
||||||
Player player = (Player) entity;
|
Player player = (Player) entity;
|
||||||
|
|
||||||
if (!player.isOnline()) {
|
if (!player.isOnline()) {
|
||||||
@ -44,14 +45,14 @@ public class BleedTimerTask extends BukkitRunnable {
|
|||||||
ParticleEffectUtils.playBleedEffect(entity);
|
ParticleEffectUtils.playBleedEffect(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
entry.setValue(entry.getValue() - damage);
|
entry.setValue(entry.getValue() - 1);
|
||||||
|
|
||||||
if (entry.getValue() <= 0) {
|
if (entry.getValue() <= 0) {
|
||||||
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleeding.Stopped"));
|
player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleeding.Stopped"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
damage = 2;
|
damage = AdvancedConfig.getInstance().getBleedDamageMobs();
|
||||||
|
|
||||||
// Anticipate the entity's death to prevent CME because of our EntityDeathEvent listener
|
// Anticipate the entity's death to prevent CME because of our EntityDeathEvent listener
|
||||||
if (entity.getHealth() - damage > 0) {
|
if (entity.getHealth() - damage > 0) {
|
||||||
|
@ -447,6 +447,11 @@ Skills:
|
|||||||
ChanceMax: 75.0
|
ChanceMax: 75.0
|
||||||
MaxBonusLevel: 750
|
MaxBonusLevel: 750
|
||||||
|
|
||||||
|
# Damage_Player: Bleeding damage dealt to players
|
||||||
|
# Damage_Mobs: Bleeding damage dealt to mobs
|
||||||
|
Damage_Player: 1.0
|
||||||
|
Damage_Mobs: 2.0
|
||||||
|
|
||||||
# These settings determine how long the Bleeding effect lasts
|
# These settings determine how long the Bleeding effect lasts
|
||||||
MaxTicks: 3
|
MaxTicks: 3
|
||||||
BaseTicks: 2
|
BaseTicks: 2
|
||||||
|
Loading…
Reference in New Issue
Block a user