From b782225ddeb19d851e399540951602a3db249066 Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 23 Feb 2012 11:33:22 -0500 Subject: [PATCH 1/3] Removed old Unarmed stuff from locale files. --- src/main/resources/locale/locale_de.properties | 6 ------ src/main/resources/locale/locale_en_us.properties | 6 ------ src/main/resources/locale/locale_es_es.properties | 6 ------ src/main/resources/locale/locale_fi.properties | 6 ------ src/main/resources/locale/locale_fr.properties | 6 ------ src/main/resources/locale/locale_nl.properties | 6 ------ src/main/resources/locale/locale_pl.properties | 6 ------ src/main/resources/locale/locale_pt_br.properties | 6 ------ src/main/resources/locale/locale_ru.properties | 6 ------ 9 files changed, 54 deletions(-) diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index deebcbdb3..07b94f4da 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/src/main/resources/locale/locale_de.properties @@ -163,14 +163,8 @@ m.EffectsUnarmed2_0=[[YELLOW]]Entwaffnen (Spieler) m.EffectsUnarmed2_1=[[AQUA]]Droppt Item welches Feind in Hand haelt m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=[[YELLOW]]Faustkampflehrling -m.EffectsUnarmed4_1=[[AQUA]]Schadens-Bonus m.EffectsUnarmed5_0=[[YELLOW]]Pfeil ablenken m.EffectsUnarmed5_1=[[AQUA]]wehrt Pfeile ab -m.AbilLockUnarmed1=[[DARK_AQUA]]gesperrt bis 250+ Skilllevel (Faustkampflehrling) -m.AbilLockUnarmed2=[[DARK_AQUA]]gesperrt bis 500+ Skilllevel (Faustkampfmeister) -m.AbilBonusUnarmed1_0=[[YELLOW]]Faustkampflehrling -m.AbilBonusUnarmed1_1=[[AQUA]]+2 Schadens-Bonus m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[YELLOW]]Pfeil ablenken Chance: [[GREEN]]{0}% diff --git a/src/main/resources/locale/locale_en_us.properties b/src/main/resources/locale/locale_en_us.properties index 9a77428f4..868560933 100644 --- a/src/main/resources/locale/locale_en_us.properties +++ b/src/main/resources/locale/locale_en_us.properties @@ -163,14 +163,8 @@ m.EffectsUnarmed2_0=Disarm (Players) m.EffectsUnarmed2_1=Drops the foes item held in hand m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=Unarmed Apprentice -m.EffectsUnarmed4_1=Damage Upgrade m.EffectsUnarmed5_0=Arrow Deflect m.EffectsUnarmed5_1=Deflect arrows -m.AbilLockUnarmed1=LOCKED UNTIL 250+ SKILL (UNARMED APPRENTICE) -m.AbilLockUnarmed2=LOCKED UNTIL 500+ SKILL (UNARMED MASTERY) -m.AbilBonusUnarmed1_0=Unarmed Apprentice -m.AbilBonusUnarmed1_1=+2 DMG Upgrade m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[RED]]Arrow Deflect Chance: [[YELLOW]]{0}% diff --git a/src/main/resources/locale/locale_es_es.properties b/src/main/resources/locale/locale_es_es.properties index 1003f4f58..554b98471 100644 --- a/src/main/resources/locale/locale_es_es.properties +++ b/src/main/resources/locale/locale_es_es.properties @@ -163,14 +163,8 @@ m.EffectsUnarmed2_0=Desarmar (Jugadores) m.EffectsUnarmed2_1=Caida del objeto de mano del enemigo m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=Aprendiz desarmado -m.EffectsUnarmed4_1=Mejora de daños m.EffectsUnarmed5_0=Desviar flechas m.EffectsUnarmed5_1=Desviar flechas -m.AbilLockUnarmed1=BLOQUEADO HASTA TENER HABILIDAD +250 (APRENDIZ DESARMADO) -m.AbilLockUnarmed2=BLOQUEADO HASTA TENER HABILIDAD +500 (MAESTRO DESARMADO) -m.AbilBonusUnarmed1_0=Aprendiz desarmado -m.AbilBonusUnarmed1_1=Mejora de +2 de daño m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[RED]]Posibilidad de Desviar flechas: [[YELLOW]]{0}% diff --git a/src/main/resources/locale/locale_fi.properties b/src/main/resources/locale/locale_fi.properties index 693c4ddb1..91966883a 100644 --- a/src/main/resources/locale/locale_fi.properties +++ b/src/main/resources/locale/locale_fi.properties @@ -163,14 +163,8 @@ m.EffectsUnarmed2_0=Aseista riisuminen (Pelaajat) m.EffectsUnarmed2_1=Pudottaa vihollisen esineen kädestä m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=Aseistamattomuuden Aloittelija -m.EffectsUnarmed4_1=Vahingonlisäys m.EffectsUnarmed5_0=Nuolentorjunta m.EffectsUnarmed5_1=Torjuu nuolia -m.AbilLockUnarmed1=LUKITTU KUNNES 250+ TAITO (ASEISTAMATTOMUUDEN ALOITTELIJA) -m.AbilLockUnarmed2=LUKITTU KUNNES 500+ TAITO (ASEISTAMATTOMUUDEN HERRA) -m.AbilBonusUnarmed1_0=Aseistamattomuuden Aloittelija -m.AbilBonusUnarmed1_1=+2 Vahinko m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[RED]]Nuolentorjunnan todennäköisyys: [[YELLOW]]{0}% diff --git a/src/main/resources/locale/locale_fr.properties b/src/main/resources/locale/locale_fr.properties index 688e21886..d5e7f8fa0 100644 --- a/src/main/resources/locale/locale_fr.properties +++ b/src/main/resources/locale/locale_fr.properties @@ -163,14 +163,8 @@ m.EffectsUnarmed2_0=D m.EffectsUnarmed2_1=Vole l'objet que l'ennemi a dans la main m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=Maîtrise du désarmement -m.EffectsUnarmed4_1=Beaucoup plus de dégâts m.EffectsUnarmed5_0=Déviation des flèches m.EffectsUnarmed5_1=Dévie les flèches qui vous foncent dessus -m.AbilLockUnarmed1=Débloqué au niveau 250 (Apprenti du désarmement) -m.AbilLockUnarmed2=Débloqué au niveau 500 (Maîtrise du désarmement) -m.AbilBonusUnarmed1_0=Apprenti du désarmement -m.AbilBonusUnarmed1_1=+2 dégâts m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[RED]]Chances dévier les flèches : [[YELLOW]]{0}% diff --git a/src/main/resources/locale/locale_nl.properties b/src/main/resources/locale/locale_nl.properties index 325fe4a88..244286736 100644 --- a/src/main/resources/locale/locale_nl.properties +++ b/src/main/resources/locale/locale_nl.properties @@ -169,14 +169,8 @@ m.EffectsUnarmed2_0=Ontwapen (Players) m.EffectsUnarmed2_1=Dropt het wapen van de vijand m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=Onbewapende leerling -m.EffectsUnarmed4_1=Meer schade m.EffectsUnarmed5_0=Pijlafwijking m.EffectsUnarmed5_1=Laat pijlen afwijken -m.AbilLockUnarmed1=GEBLOKEERD TOT 250+ SKILL (Onbewapende leerling) -m.AbilLockUnarmed2=GEBLOKEERD TOT 500+ SKILL (Onbewapende held) -m.AbilBonusUnarmed1_0=Onbewapende leerling -m.AbilBonusUnarmed1_1=+2 meer schade m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[RED]]Kans op Pijlafwijking: [[YELLOW]]{0}% diff --git a/src/main/resources/locale/locale_pl.properties b/src/main/resources/locale/locale_pl.properties index 355808496..de5697df2 100644 --- a/src/main/resources/locale/locale_pl.properties +++ b/src/main/resources/locale/locale_pl.properties @@ -163,14 +163,8 @@ m.EffectsUnarmed2_0=Rozbrojenie (Tylko graczy) m.EffectsUnarmed2_1=Przeciwnik upuszcza trzymany w reku przedmiot. m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=Droga Smoka -m.EffectsUnarmed4_1=Zwiekszenie zadawanych obrazen. m.EffectsUnarmed5_0=Odbicie strzaly m.EffectsUnarmed5_1=Golymi rekoma potrafisz odbic nadlatujaca strzale. -m.AbilLockUnarmed1=Aby odblokowac Droge Smoka, zdobadz 250 poziom. -m.AbilLockUnarmed2=Aby odblokowac Wsciekle Piesci, zdobadz 500 poziom. -m.AbilBonusUnarmed1_0=Droga Smoka -m.AbilBonusUnarmed1_1=Zadawane obrazenia zwiekszone o 2. m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[RED]]Szansa na odbicie strzaly: [[YELLOW]]{0}% diff --git a/src/main/resources/locale/locale_pt_br.properties b/src/main/resources/locale/locale_pt_br.properties index 96e2ce83d..243d1632a 100644 --- a/src/main/resources/locale/locale_pt_br.properties +++ b/src/main/resources/locale/locale_pt_br.properties @@ -170,14 +170,8 @@ m.EffectsUnarmed2_0=Desarmar (Jogadores) m.EffectsUnarmed2_1=Derruba a arma que o adversário está segurando m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=Aprendiz do Desarmamento -m.EffectsUnarmed4_1=Aumenta o Dano m.EffectsUnarmed5_0=Desviar Flechas m.EffectsUnarmed5_1=Desvia Flechas jogadas em você -m.AbilLockUnarmed1=DESBLOQUEIE NO NIVEL 250 (APRENDIZ DE DESARMAMENTO) -m.AbilLockUnarmed2=DESBLOQUEIE NO NIVEL 500 (MESTRE DE DESARMAMENTO) -m.AbilBonusUnarmed1_0=Aprendiz do Desarmamento -m.AbilBonusUnarmed1_1=+2 de Danos m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[RED]]Chance de Desviar Flechas: [[YELLOW]]{0}% diff --git a/src/main/resources/locale/locale_ru.properties b/src/main/resources/locale/locale_ru.properties index b1876a9a1..fd2d985e2 100644 --- a/src/main/resources/locale/locale_ru.properties +++ b/src/main/resources/locale/locale_ru.properties @@ -164,14 +164,8 @@ m.EffectsUnarmed2_0= m.EffectsUnarmed2_1=Ïàäàåò îðóæèå ïðîòèâíèêà íà çåìëþ, êîòîðîå íàõîäèòñÿ â ðóêàõ ó íåãî. m.EffectsUnarmed3_0=Iron Arm Style m.EffectsUnarmed3_1=Hardens your arm over time -m.EffectsUnarmed4_0=Ó÷åíèê ðóêîïàøíîãî áîÿ -m.EffectsUnarmed4_1=Óâåëè÷åíèå óðîíà îò êóëàêîâ m.EffectsUnarmed5_0=Îòðàæåíèå ñòðåë m.EffectsUnarmed5_1=Ñòðåëû îòðàæàþòñÿ -m.AbilLockUnarmed1=Áëîêèðóåòñÿ äî 250+ óðîâíÿ(Ó÷åíèê ðóêîïàøíîãî áîÿ) -m.AbilLockUnarmed2=Áëîêèðóåòñÿ äî 500+ óðîâíÿ(Ìàñòåð Ðóêîïàøíîãî áîÿ) -m.AbilBonusUnarmed1_0=Ó÷åíèê ðóêîïàøíîãî áîÿ -m.AbilBonusUnarmed1_1=+2 áîíóñ ê óðîíó m.AbilBonusUnarmed2_0=Iron Arm Style m.AbilBonusUnarmed2_1=+{0} DMG Upgrade m.UnarmedArrowDeflectChance=[[RED]]Øàíñ îòðàçèòü ñòðåëû: [[YELLOW]]{0}% From 06b2a896468c3e8a3c1ad67c1463a515609b55b9 Mon Sep 17 00:00:00 2001 From: NuclearW Date: Thu, 23 Feb 2012 11:48:48 -0500 Subject: [PATCH 2/3] Move to external task Only remove if we have it to remove Only add if not already in memory Don't load something we would immediately unload on removeUser --- src/main/java/com/gmail/nossr50/Users.java | 14 ++++++-------- .../nossr50/listeners/mcPlayerListener.java | 12 +++--------- .../runnables/RemoveProfileFromMemoryTask.java | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 src/main/java/com/gmail/nossr50/runnables/RemoveProfileFromMemoryTask.java diff --git a/src/main/java/com/gmail/nossr50/Users.java b/src/main/java/com/gmail/nossr50/Users.java index b5b8403df..2d36024f7 100644 --- a/src/main/java/com/gmail/nossr50/Users.java +++ b/src/main/java/com/gmail/nossr50/Users.java @@ -70,7 +70,8 @@ public class Users { public static void addUser(Player player) { - players.put(player, new PlayerProfile(player)); + if(!players.containsKey(player)) + players.put(player, new PlayerProfile(player)); } public static void clearUsers() { @@ -82,14 +83,11 @@ public class Users { public static void removeUser(Player player) { - PlayerProfile PP = Users.getProfile(player); - - //Only remove PlayerProfile if user is offline - if(!player.isOnline()) + //Only remove PlayerProfile if user is offline and we have it in memory + if(!player.isOnline() && players.containsKey(player)) { - PP.save(); - if(players.containsKey(player)) - players.remove(player); + players.get(player).save(); + players.remove(player); } } diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index 32a81fe48..eee9d3478 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -57,6 +57,7 @@ import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcPermissions; import com.gmail.nossr50.commands.general.XprateCommand; import com.gmail.nossr50.config.LoadProperties; +import com.gmail.nossr50.runnables.RemoveProfileFromMemoryTask; import com.gmail.nossr50.spout.SpoutStuff; import com.gmail.nossr50.spout.mmoHelper; import com.gmail.nossr50.datatypes.PlayerProfile; @@ -169,9 +170,8 @@ public class mcPlayerListener implements Listener } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) - public void onPlayerQuit(final PlayerQuitEvent event) + public void onPlayerQuit(PlayerQuitEvent event) { - /* * GARBAGE COLLECTION */ @@ -193,13 +193,7 @@ public class mcPlayerListener implements Listener Users.getProfile(player).save(); //Schedule PlayerProfile removal 2 minutes after quitting - Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, - new Runnable() { - public void run() { - //Remove PlayerProfile - Users.removeUser(event.getPlayer()); - } - }, 2400); + Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new RemoveProfileFromMemoryTask(player), 2400); } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) diff --git a/src/main/java/com/gmail/nossr50/runnables/RemoveProfileFromMemoryTask.java b/src/main/java/com/gmail/nossr50/runnables/RemoveProfileFromMemoryTask.java new file mode 100644 index 000000000..71a013543 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/runnables/RemoveProfileFromMemoryTask.java @@ -0,0 +1,18 @@ +package com.gmail.nossr50.runnables; + +import org.bukkit.entity.Player; + +import com.gmail.nossr50.Users; + +public class RemoveProfileFromMemoryTask implements Runnable { + private Player player; + + public RemoveProfileFromMemoryTask(Player player) { + this.player = player; + } + + @Override + public void run() { + Users.removeUser(player); + } +} From 708cfc23b685359d023fb92a6eb4654b97f438ea Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 23 Feb 2012 13:09:23 -0500 Subject: [PATCH 3/3] Locale stuff for Blast Mining --- .../commands/skills/MiningCommand.java | 81 +++++++++++++++++++ .../com/gmail/nossr50/skills/BlastMining.java | 9 ++- .../resources/locale/locale_de.properties | 22 ++++- .../resources/locale/locale_en_us.properties | 26 +++++- .../resources/locale/locale_es_es.properties | 22 ++++- .../resources/locale/locale_fi.properties | 22 ++++- .../resources/locale/locale_fr.properties | 22 ++++- .../resources/locale/locale_nl.properties | 22 ++++- .../resources/locale/locale_pl.properties | 22 ++++- .../resources/locale/locale_pt_br.properties | 22 ++++- .../resources/locale/locale_ru.properties | 22 ++++- 11 files changed, 279 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java index f8e3bb3a2..e431666b1 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java @@ -30,6 +30,46 @@ public class MiningCommand implements CommandExecutor { x -= 50; ticks++; } + + int rank = 0; + int damage = 0; + int radius = 0; + if(PP.getSkillLevel(SkillType.MINING) >= 125 && PP.getSkillLevel(SkillType.MINING) < 250) + rank = 1; + if(PP.getSkillLevel(SkillType.MINING) >= 250 && PP.getSkillLevel(SkillType.MINING) < 375){ + rank = 2; + radius = 1; + } + if(PP.getSkillLevel(SkillType.MINING) >= 375 && PP.getSkillLevel(SkillType.MINING) < 500){ + rank = 3; + radius = 1; + } + if(PP.getSkillLevel(SkillType.MINING) >= 500 && PP.getSkillLevel(SkillType.MINING) < 625){ + rank = 4; + damage = 25; + radius = 2; + } + if(PP.getSkillLevel(SkillType.MINING) >= 625 && PP.getSkillLevel(SkillType.MINING) < 750){ + rank = 5; + damage = 25; + radius = 2; + } + if(PP.getSkillLevel(SkillType.MINING) >= 750 && PP.getSkillLevel(SkillType.MINING) < 875){ + rank = 6; + damage = 50; + radius = 3; + } + if(PP.getSkillLevel(SkillType.MINING) >= 875 && PP.getSkillLevel(SkillType.MINING) < 1000){ + rank = 7; + damage = 50; + radius = 3; + } + if(PP.getSkillLevel(SkillType.MINING) >= 1000){ + rank = 8; + damage = 100; + radius = 4; + } + player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillMining") })); player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainMining") })); @@ -39,9 +79,50 @@ public class MiningCommand implements CommandExecutor { player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.Effects") })); player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining1_0"), mcLocale.getString("m.EffectsMining1_1") })); player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining2_0"), mcLocale.getString("m.EffectsMining2_1") })); + player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining3_0"), mcLocale.getString("m.EffectsMining3_1") })); + player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining4_0"), mcLocale.getString("m.EffectsMining4_1") })); + player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsMining5_0"), mcLocale.getString("m.EffectsMining5_1") })); player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") })); player.sendMessage(mcLocale.getString("m.MiningDoubleDropChance", new Object[] { percentage })); player.sendMessage(mcLocale.getString("m.MiningSuperBreakerLength", new Object[] { ticks })); + if (PP.getSkillLevel(SkillType.MINING) < 125) + player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining1") })); + else{ + switch (rank){ + case 1: + player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining1") })); + break; + case 2: + player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining2") })); + break; + case 3: + player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining3") })); + break; + case 4: + player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining4") })); + break; + case 5: + player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining5") })); + break; + case 6: + player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining6") })); + break; + case 7: + player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining7") })); + break; + case 8: + player.sendMessage(mcLocale.getString("m.MiningBlastMining", new Object[] { rank, mcLocale.getString("m.BlastMining8") })); + break; + } + } + if (PP.getSkillLevel(SkillType.MINING) < 250) + player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining2") })); + else + player.sendMessage(mcLocale.getString("m.MiningBiggerBombs", new Object[] { radius })); + if (PP.getSkillLevel(SkillType.MINING) < 500) + player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockMining3") })); + else + player.sendMessage(mcLocale.getString("m.MiningDemolitionsExpertDamageDecrease", new Object[] { damage })); return true; } diff --git a/src/main/java/com/gmail/nossr50/skills/BlastMining.java b/src/main/java/com/gmail/nossr50/skills/BlastMining.java index afdd5d9ac..45bc914c7 100644 --- a/src/main/java/com/gmail/nossr50/skills/BlastMining.java +++ b/src/main/java/com/gmail/nossr50/skills/BlastMining.java @@ -365,7 +365,8 @@ public class BlastMining{ * Demolitions Expertise (Unlocked at Mining 500) * * Reduces explosion damage to 1/4 of normal at 500. - * Reduces explosion damage to 1/2 of normal at 1000. + * Reduces explosion damage to 1/2 of normal at 750. + * Reduces explosion damage to 0 at 1000. */ public static void demolitionsExpertise(Player player, EntityDamageEvent event) { @@ -374,10 +375,12 @@ public class BlastMining{ int damage = event.getDamage(); if(skill < 500) return; - if(skill >= 500 && skill < 1000) + if(skill >= 500 && skill < 750) damage = damage/4; - if(skill >= 1000) + if(skill >= 750 && skill < 1000) damage = damage/2; + if(skill >= 1000) + damage = 0; event.setDamage(damage); } diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index 07b94f4da..ac65e6dd8 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/src/main/resources/locale/locale_de.properties @@ -376,4 +376,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file diff --git a/src/main/resources/locale/locale_en_us.properties b/src/main/resources/locale/locale_en_us.properties index 868560933..8ccfc72bc 100644 --- a/src/main/resources/locale/locale_en_us.properties +++ b/src/main/resources/locale/locale_en_us.properties @@ -101,7 +101,7 @@ m.EffectsAxes2_0=Critical Strikes m.EffectsAxes2_1=Double Damage m.EffectsAxes3_0=Axe Mastery m.EffectsAxes3_1=Modifies Damage -m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXEMASTERY) +m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY) m.AbilBonusAxes1_0=Axe Mastery m.AbilBonusAxes1_1=Bonus 4 damage m.AxesCritChance=[[RED]]Chance to critically strike: [[YELLOW]]{0}% @@ -141,6 +141,8 @@ m.EffectsMining1_0=Super Breaker (ABILITY) m.EffectsMining1_1=Speed+, Triple Drop Chance m.EffectsMining2_0=Double Drops m.EffectsMining2_1=Double the normal loot +m.EffectsMining2_0=Double Drops +m.EffectsMining2_1=Double the normal loot m.MiningDoubleDropChance=[[RED]]Double Drop Chance: [[YELLOW]]{0}% m.MiningSuperBreakerLength=[[RED]]Super Breaker Length: [[YELLOW]]{0}s m.SkillRepair=REPAIR @@ -369,4 +371,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file diff --git a/src/main/resources/locale/locale_es_es.properties b/src/main/resources/locale/locale_es_es.properties index 554b98471..cdb98bcc6 100644 --- a/src/main/resources/locale/locale_es_es.properties +++ b/src/main/resources/locale/locale_es_es.properties @@ -369,4 +369,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file diff --git a/src/main/resources/locale/locale_fi.properties b/src/main/resources/locale/locale_fi.properties index 91966883a..2250b355d 100644 --- a/src/main/resources/locale/locale_fi.properties +++ b/src/main/resources/locale/locale_fi.properties @@ -358,4 +358,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file diff --git a/src/main/resources/locale/locale_fr.properties b/src/main/resources/locale/locale_fr.properties index d5e7f8fa0..0fc0cd1b4 100644 --- a/src/main/resources/locale/locale_fr.properties +++ b/src/main/resources/locale/locale_fr.properties @@ -369,4 +369,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file diff --git a/src/main/resources/locale/locale_nl.properties b/src/main/resources/locale/locale_nl.properties index 244286736..091be2974 100644 --- a/src/main/resources/locale/locale_nl.properties +++ b/src/main/resources/locale/locale_nl.properties @@ -375,4 +375,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file diff --git a/src/main/resources/locale/locale_pl.properties b/src/main/resources/locale/locale_pl.properties index de5697df2..7110d4382 100644 --- a/src/main/resources/locale/locale_pl.properties +++ b/src/main/resources/locale/locale_pl.properties @@ -369,4 +369,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file diff --git a/src/main/resources/locale/locale_pt_br.properties b/src/main/resources/locale/locale_pt_br.properties index 243d1632a..ea4a0266e 100644 --- a/src/main/resources/locale/locale_pt_br.properties +++ b/src/main/resources/locale/locale_pt_br.properties @@ -377,4 +377,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file diff --git a/src/main/resources/locale/locale_ru.properties b/src/main/resources/locale/locale_ru.properties index fd2d985e2..fc5fca7c9 100644 --- a/src/main/resources/locale/locale_ru.properties +++ b/src/main/resources/locale/locale_ru.properties @@ -361,4 +361,24 @@ m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service m.AbilBonusTaming5_1=50% Chance for heal on attack -Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file +Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! +m.EffectsMining3_0=Blast Mining +m.EffectsMining3_1=Bonuses to mining with TNT +m.EffectsMining4_0=Bigger Bombs +m.EffectsMining4_1=Increases TNT explosion radius +m.EffectsMining5_0=Demolitions Expertise +m.EffectsMining5_1=Decreases damage from TNT explosions +m.AbilLockMining1=LOCKED UNTIL 125+ SKILL (BLAST MINING) +m.AbilLockMining2=LOCKED UNTIL 250+ SKILL (BIGGER BOMBS) +m.AbilLockMining3=LOCKED UNTIL 500+ SKILL (DEMOLITIONS EXPERTISE) +m.MiningBiggerBombs=[[RED]]Blast Radius Increase: [[YELLOW]]+{0} +m.MiningDemolitionsExpertDamageDecrease=[[RED]]Demolitions Expert Damage Decrease: [[YELLOW]]{0}% +m.MiningBlastMining=[[RED]]Blast Mining: [[YELLOW]] Rank {0} [[GRAY]]({1}) +m.BlastMining1 = +5% ore yield +m.BlastMining2 = +10% ore yield +m.BlastMining3 = +15% ore yield, no debris +m.BlastMining4 = +20% ore yield, no debris +m.BlastMining5 = +25% ore yield, no debris, double drops +m.BlastMining6 = +30% ore yield, no debris, double drops +m.BlastMining7 = +35% ore yield, no debris, triple drops +m.BlastMining8 = +40% ore yield, no debris, triple drops \ No newline at end of file