forked from Upstream/mmocore
Fixed %mmocore_in_combat%
This commit is contained in:
parent
a84d240a4e
commit
e1011d449f
@ -33,15 +33,20 @@ public class CombatHandler implements Closable {
|
||||
// Simply refreshing
|
||||
if (isInCombat()) {
|
||||
Bukkit.getScheduler().cancelTask(task.getTaskId());
|
||||
task = Bukkit.getScheduler().runTaskLater(MMOCore.plugin, () -> quit(false), MMOCore.plugin.configManager.combatLogTimer / 50);
|
||||
task = newTask();
|
||||
|
||||
// Entering combat
|
||||
} else {
|
||||
MMOCore.plugin.configManager.getSimpleMessage("now-in-combat").send(player.getPlayer());
|
||||
Bukkit.getPluginManager().callEvent(new PlayerCombatEvent(player, true));
|
||||
task = newTask();
|
||||
}
|
||||
}
|
||||
|
||||
private BukkitTask newTask() {
|
||||
return Bukkit.getScheduler().runTaskLater(MMOCore.plugin, () -> quit(false), MMOCore.plugin.configManager.combatLogTimer / 50);
|
||||
}
|
||||
|
||||
public boolean isInPvpMode() {
|
||||
return pvpMode;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user