mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Vampirism can now be enabled without having Skill Death Penalty enabled
This commit is contained in:
parent
0455416dec
commit
0ce41150c6
@ -27,6 +27,7 @@ Version 1.4.07-dev
|
|||||||
! Changed the way Repair hands out XP, also added config options to control Repair XP
|
! Changed the way Repair hands out XP, also added config options to control Repair XP
|
||||||
! Changed Swords "Counter Attack" ability from passive to active. Blocking is required to activate.
|
! Changed Swords "Counter Attack" ability from passive to active. Blocking is required to activate.
|
||||||
! Hardcore mode can now be toggled for each skill individually
|
! Hardcore mode can now be toggled for each skill individually
|
||||||
|
! Vampirism can now be enabled without having Skill Death Penalty enabled
|
||||||
! Admin and Party chat prefixes are now customizable
|
! Admin and Party chat prefixes are now customizable
|
||||||
! Changed the color of party leader names in Party chat
|
! Changed the color of party leader names in Party chat
|
||||||
! Moved all experience formula related settings from config.yml to experienceFormula.yml (This includes skill modifiers and curve modifiers)
|
! Moved all experience formula related settings from config.yml to experienceFormula.yml (This includes skill modifiers and curve modifiers)
|
||||||
|
@ -123,7 +123,7 @@ public class PlayerListener implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onPlayerDeathMonitor(PlayerDeathEvent event) {
|
public void onPlayerDeathMonitor(PlayerDeathEvent event) {
|
||||||
if (!HardcoreManager.getHardcoreStatLossEnabled()) {
|
if (!HardcoreManager.getHardcoreStatLossEnabled() && !HardcoreManager.getHardcoreVampirismEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,8 +139,10 @@ public class PlayerListener implements Listener {
|
|||||||
HardcoreManager.invokeVampirism(killer, killedPlayer);
|
HardcoreManager.invokeVampirism(killer, killedPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (HardcoreManager.getHardcoreStatLossEnabled()) {
|
||||||
HardcoreManager.invokeStatPenalty(killedPlayer);
|
HardcoreManager.invokeStatPenalty(killedPlayer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Monitor PlayerChangedWorldEvents.
|
* Monitor PlayerChangedWorldEvents.
|
||||||
|
@ -43,16 +43,32 @@ public final class Motd {
|
|||||||
* @param player Target player
|
* @param player Target player
|
||||||
*/
|
*/
|
||||||
public static void displayHardcoreSettings(Player player) {
|
public static void displayHardcoreSettings(Player player) {
|
||||||
if (HardcoreManager.getHardcoreStatLossEnabled()) {
|
if (!HardcoreManager.getHardcoreStatLossEnabled() && !HardcoreManager.getHardcoreVampirismEnabled()) {
|
||||||
if (HardcoreManager.getHardcoreVampirismEnabled()) {
|
return;
|
||||||
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOn"));
|
}
|
||||||
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", Config.getInstance().getHardcoreDeathStatPenaltyPercentage()));
|
|
||||||
player.sendMessage(LocaleLoader.getString("MOTD.Vampire.Stats", Config.getInstance().getHardcoreVampirismStatLeechPercentage()));
|
String enabledModes;
|
||||||
|
|
||||||
|
boolean deathStatLossEnabled = HardcoreManager.getHardcoreStatLossEnabled();
|
||||||
|
boolean vampirismEnabled = HardcoreManager.getHardcoreVampirismEnabled();
|
||||||
|
if (deathStatLossEnabled && vampirismEnabled) {
|
||||||
|
enabledModes = LocaleLoader.getString("Hardcore.DeathStatLoss.Name") + " & " + LocaleLoader.getString("Hardcore.Vampirism.Name");
|
||||||
|
}
|
||||||
|
else if (deathStatLossEnabled) {
|
||||||
|
enabledModes = LocaleLoader.getString("Hardcore.DeathStatLoss.Name");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOff"));
|
enabledModes = LocaleLoader.getString("Hardcore.Vampirism.Name");
|
||||||
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", Config.getInstance().getHardcoreDeathStatPenaltyPercentage()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Enabled", enabledModes));
|
||||||
|
|
||||||
|
if (deathStatLossEnabled) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.DeathStatLoss.Stats", Config.getInstance().getHardcoreDeathStatPenaltyPercentage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vampirismEnabled) {
|
||||||
|
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Vampirism.Stats", Config.getInstance().getHardcoreVampirismStatLeechPercentage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -713,11 +713,10 @@ Spout.Title={0}\n[[YELLOW]]P[[GOLD]]lvl[[WHITE]].[[GREEN]]{1}
|
|||||||
|
|
||||||
#MOTD
|
#MOTD
|
||||||
MOTD.Donate=[[DARK_AQUA]]Donation Info:
|
MOTD.Donate=[[DARK_AQUA]]Donation Info:
|
||||||
MOTD.Hardcore.VampireOff=[[GOLD]][mcMMO] [[DARK_RED]]Hardcore & Vampirism enabled.
|
MOTD.Hardcore.Enabled=[[GOLD]][mcMMO] [[DARK_AQUA]]Hardcore Mode enabled: [[DARK_RED]]{0}
|
||||||
MOTD.Hardcore.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Skill Death Penalty: [[DARK_RED]]{0}%
|
MOTD.Hardcore.DeathStatLoss.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Skill Death Penalty: [[DARK_RED]]{0}%
|
||||||
MOTD.Hardcore.VampireOn=[[GOLD]][mcMMO] [[DARK_RED]]Hardcore enabled.
|
MOTD.Hardcore.Vampirism.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Vampirism Stat Leech: [[DARK_RED]]{0}%
|
||||||
MOTD.PerksPrefix=[[RED]][mcMMO Perks]
|
MOTD.PerksPrefix=[[RED]][mcMMO Perks]
|
||||||
MOTD.Vampire.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Vampirism Stat Leech: [[DARK_RED]]{0}%
|
|
||||||
MOTD.Version=[[GOLD]][mcMMO] Running version [[DARK_AQUA]]{0}
|
MOTD.Version=[[GOLD]][mcMMO] Running version [[DARK_AQUA]]{0}
|
||||||
MOTD.Website=[[GOLD]][mcMMO] [[GREEN]]{0}[[YELLOW]] - mcMMO Website
|
MOTD.Website=[[GOLD]][mcMMO] [[GREEN]]{0}[[YELLOW]] - mcMMO Website
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user