Vampirism can now be enabled without having Skill Death Penalty enabled

This commit is contained in:
TfT_02 2013-08-21 19:15:17 +02:00
parent 0455416dec
commit 0ce41150c6
4 changed files with 37 additions and 19 deletions

View File

@ -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 Swords "Counter Attack" ability from passive to active. Blocking is required to activate.
! 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
! 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)

View File

@ -123,7 +123,7 @@ public class PlayerListener implements Listener {
*/
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onPlayerDeathMonitor(PlayerDeathEvent event) {
if (!HardcoreManager.getHardcoreStatLossEnabled()) {
if (!HardcoreManager.getHardcoreStatLossEnabled() && !HardcoreManager.getHardcoreVampirismEnabled()) {
return;
}
@ -139,7 +139,9 @@ public class PlayerListener implements Listener {
HardcoreManager.invokeVampirism(killer, killedPlayer);
}
HardcoreManager.invokeStatPenalty(killedPlayer);
if (HardcoreManager.getHardcoreStatLossEnabled()) {
HardcoreManager.invokeStatPenalty(killedPlayer);
}
}
/**

View File

@ -30,7 +30,7 @@ public final class Motd {
/**
* Display version info.
*
* @param player Target player
* @param player Target player
* @param version Plugin version
*/
public static void displayVersion(Player player, String version) {
@ -43,16 +43,32 @@ public final class Motd {
* @param player Target player
*/
public static void displayHardcoreSettings(Player player) {
if (HardcoreManager.getHardcoreStatLossEnabled()) {
if (HardcoreManager.getHardcoreVampirismEnabled()) {
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()));
}
else {
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.VampireOff"));
player.sendMessage(LocaleLoader.getString("MOTD.Hardcore.Stats", Config.getInstance().getHardcoreDeathStatPenaltyPercentage()));
}
if (!HardcoreManager.getHardcoreStatLossEnabled() && !HardcoreManager.getHardcoreVampirismEnabled()) {
return;
}
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 {
enabledModes = LocaleLoader.getString("Hardcore.Vampirism.Name");
}
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()));
}
}
@ -113,7 +129,7 @@ public final class Motd {
/**
* Display website info.
*
* @param player Target player
* @param player Target player
* @param website Plugin website
*/
public static void displayWebsite(Player player, String website) {

View File

@ -713,11 +713,10 @@ Spout.Title={0}\n[[YELLOW]]P[[GOLD]]lvl[[WHITE]].[[GREEN]]{1}
#MOTD
MOTD.Donate=[[DARK_AQUA]]Donation Info:
MOTD.Hardcore.VampireOff=[[GOLD]][mcMMO] [[DARK_RED]]Hardcore & Vampirism enabled.
MOTD.Hardcore.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Skill Death Penalty: [[DARK_RED]]{0}%
MOTD.Hardcore.VampireOn=[[GOLD]][mcMMO] [[DARK_RED]]Hardcore enabled.
MOTD.Hardcore.Enabled=[[GOLD]][mcMMO] [[DARK_AQUA]]Hardcore Mode enabled: [[DARK_RED]]{0}
MOTD.Hardcore.DeathStatLoss.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Skill Death Penalty: [[DARK_RED]]{0}%
MOTD.Hardcore.Vampirism.Stats=[[GOLD]][mcMMO] [[DARK_AQUA]]Vampirism Stat Leech: [[DARK_RED]]{0}%
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.Website=[[GOLD]][mcMMO] [[GREEN]]{0}[[YELLOW]] - mcMMO Website