forked from Upstream/mmocore
add combat log timer
make sure to add these to your config.yml #Timer for combat log to expire (in seconds) combat-log: timer: 10
This commit is contained in:
parent
3e802ee522
commit
55c03d88fa
@ -29,7 +29,7 @@ public class CombatRunnable extends BukkitRunnable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (lastHit + 10000 < System.currentTimeMillis()) {
|
if (lastHit + (config.combatLogTimer * 100) < System.currentTimeMillis()) {
|
||||||
Bukkit.getPluginManager().callEvent(new PlayerCombatEvent(player, false));
|
Bukkit.getPluginManager().callEvent(new PlayerCombatEvent(player, false));
|
||||||
config.getSimpleMessage("leave-combat").send(player.getPlayer());
|
config.getSimpleMessage("leave-combat").send(player.getPlayer());
|
||||||
close();
|
close();
|
||||||
|
@ -30,6 +30,7 @@ public class ConfigManager {
|
|||||||
public double expPartyBuff, regenPartyBuff;
|
public double expPartyBuff, regenPartyBuff;
|
||||||
public String partyChatPrefix;
|
public String partyChatPrefix;
|
||||||
public ChatColor manaFull, manaHalf, manaEmpty, staminaFull, staminaHalf, staminaEmpty;
|
public ChatColor manaFull, manaHalf, manaEmpty, staminaFull, staminaHalf, staminaEmpty;
|
||||||
|
public int combatLogTimer;
|
||||||
|
|
||||||
public final DecimalFormatSymbols formatSymbols = new DecimalFormatSymbols();
|
public final DecimalFormatSymbols formatSymbols = new DecimalFormatSymbols();
|
||||||
public final DecimalFormat decimal = new DecimalFormat("0.#", formatSymbols), decimals = new DecimalFormat("0.##", formatSymbols);
|
public final DecimalFormat decimal = new DecimalFormat("0.#", formatSymbols), decimals = new DecimalFormat("0.##", formatSymbols);
|
||||||
@ -100,6 +101,7 @@ public class ConfigManager {
|
|||||||
regenPartyBuff = MMOCore.plugin.getConfig().getDouble("party.buff.health-regen");
|
regenPartyBuff = MMOCore.plugin.getConfig().getDouble("party.buff.health-regen");
|
||||||
partyChatPrefix = MMOCore.plugin.getConfig().getString("party.chat-prefix");
|
partyChatPrefix = MMOCore.plugin.getConfig().getString("party.chat-prefix");
|
||||||
formatSymbols.setDecimalSeparator(getFirstChar(MMOCore.plugin.getConfig().getString("number-format.decimal-separator"), ','));
|
formatSymbols.setDecimalSeparator(getFirstChar(MMOCore.plugin.getConfig().getString("number-format.decimal-separator"), ','));
|
||||||
|
combatLogTimer = MMOCore.plugin.getConfig().getInt("combat-log.timer");
|
||||||
|
|
||||||
manaFull = getColorOrDefault("mana-whole", ChatColor.BLUE);
|
manaFull = getColorOrDefault("mana-whole", ChatColor.BLUE);
|
||||||
manaHalf = getColorOrDefault("mana-half", ChatColor.AQUA);
|
manaHalf = getColorOrDefault("mana-half", ChatColor.AQUA);
|
||||||
|
@ -91,6 +91,10 @@ use-chat-input: true
|
|||||||
# Prevents mobs spawned from spawners from giving XP points.
|
# Prevents mobs spawned from spawners from giving XP points.
|
||||||
prevent-spawner-xp: true
|
prevent-spawner-xp: true
|
||||||
|
|
||||||
|
#Timer for combat log to expire (in seconds)
|
||||||
|
combat-log:
|
||||||
|
timer: 10
|
||||||
|
|
||||||
# Change this to the name of the color you want for
|
# Change this to the name of the color you want for
|
||||||
# the different resource bar placeholders
|
# the different resource bar placeholders
|
||||||
resource-bar-colors:
|
resource-bar-colors:
|
||||||
|
Loading…
Reference in New Issue
Block a user