From 942a8363f3c40e3a4f26f652519f947a42a71622 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 2 Dec 2011 01:14:18 -0800 Subject: [PATCH] Version 1.2.01 --- src/Changelog.txt | 15 ++++++ src/com/gmail/nossr50/Combat.java | 2 +- src/com/gmail/nossr50/command/Commands.java | 2 +- .../gmail/nossr50/config/LoadProperties.java | 20 ++++++-- .../nossr50/listeners/mcPlayerListener.java | 12 ++--- .../gmail/nossr50/locale/locale_de.properties | 2 +- .../nossr50/locale/locale_en_us.properties | 2 +- .../nossr50/locale/locale_es_es.properties | 2 +- .../gmail/nossr50/locale/locale_fi.properties | 2 +- .../gmail/nossr50/locale/locale_fr.properties | 2 +- .../gmail/nossr50/locale/locale_nl.properties | 2 +- .../gmail/nossr50/locale/locale_pl.properties | 2 +- .../nossr50/locale/locale_pt_br.properties | 2 +- .../gmail/nossr50/locale/locale_ru.properties | 2 +- src/com/gmail/nossr50/mcMMO.java | 30 +++++------ src/com/gmail/nossr50/skills/Repair.java | 47 ++++++------------ src/com/gmail/nossr50/skills/Skills.java | 18 ++++--- src/com/gmail/nossr50/spout/SpoutStuff.java | 27 ++++++++-- src/plugin.yml | 2 +- src/resources/Fishing.png | Bin 0 -> 3116 bytes src/resources/Fishing_r.png | Bin 0 -> 2912 bytes 21 files changed, 116 insertions(+), 77 deletions(-) create mode 100644 src/resources/Fishing.png create mode 100644 src/resources/Fishing_r.png diff --git a/src/Changelog.txt b/src/Changelog.txt index ae3c12efd..b7c0fa1f4 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -1,5 +1,20 @@ Changelog: #Versions without changelogs probably had very small misc fixes, like tweaks to the source code +Version 1.2.01 +Added a setting to turn off abilities completely from config +Added a setting to just turn off ability messages from config +Fixed the bug with sword repair +Fixed mcMMO not working properly with Spout +Added Fishing XP icon to Normal/Retro HUDs for Spout +Added icons to Spout notifications for leveling Fishing +Added Fishing Retro XP bar color customization to config file +The number of bones required to use Call of The Wild is now configurable +Reduced the XP animals would give from 1.5x to 1x +Removed current durability value message from Repairing +Fixed bug where Arcane Forging failed to display messages +Fixed bug where Arcane Forging tries to downgrade level 1 enchants +Fixed bug where Arcane Forging always kept enchantments if you had under 100 Repair skill + Version 1.2.00 Added Fishing Skill Added Call Of The Wild to Taming diff --git a/src/com/gmail/nossr50/Combat.java b/src/com/gmail/nossr50/Combat.java index a0aaff6a5..9df5bd91f 100644 --- a/src/com/gmail/nossr50/Combat.java +++ b/src/com/gmail/nossr50/Combat.java @@ -386,7 +386,7 @@ public class Combat if(entity instanceof Animals) { - xp = (int) (xpinc * 1.5); + xp = (int) (xpinc * 1); } else { if(entity instanceof Enderman) diff --git a/src/com/gmail/nossr50/command/Commands.java b/src/com/gmail/nossr50/command/Commands.java index e766f5a43..6a97f3a92 100644 --- a/src/com/gmail/nossr50/command/Commands.java +++ b/src/com/gmail/nossr50/command/Commands.java @@ -106,7 +106,7 @@ public class Commands player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming5_0"), mcLocale.getString("m.EffectsTaming5_1")})); player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming6_0"), mcLocale.getString("m.EffectsTaming6_1")})); player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] {mcLocale.getString("m.EffectsTaming7_0"), mcLocale.getString("m.EffectsTaming7_1")})); - player.sendMessage(mcLocale.getString("m.EffectsTaming7_2")); + player.sendMessage(mcLocale.getString("m.EffectsTaming7_2", new Object[] {LoadProperties.bonesConsumedByCOTW})); player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] {mcLocale.getString("m.YourStats")})); if(PP.getSkillLevel(SkillType.TAMING) < 100) player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] {mcLocale.getString("m.AbilLockTaming1")})); diff --git a/src/com/gmail/nossr50/config/LoadProperties.java b/src/com/gmail/nossr50/config/LoadProperties.java index e3e4b1411..9d67d3b6c 100644 --- a/src/com/gmail/nossr50/config/LoadProperties.java +++ b/src/com/gmail/nossr50/config/LoadProperties.java @@ -23,7 +23,7 @@ import com.gmail.nossr50.datatypes.HUDType; public class LoadProperties { - public static Boolean showDisplayName, showFaces, watch, xplockEnable, xpbar, xpicon, partybar, string, bucket, web, xprateEnable, slimeballs, spoutEnabled, + public static Boolean enableAbilityMessages, enableAbilities, showDisplayName, showFaces, watch, xplockEnable, xpbar, xpicon, partybar, string, bucket, web, xprateEnable, slimeballs, spoutEnabled, donateMessage, chimaeraWingEnable, xpGainsMobSpawners, myspawnEnable, mccEnable, mcmmoEnable, partyEnable, inviteEnable, acceptEnable, whoisEnable, statsEnable, addxpEnable, ptpEnable, mmoeditEnable, clearmyspawnEnable, mcgodEnable, mcabilityEnable, mctopEnable, mcrefreshEnable, enableMotd, enableMySpawn, enableRegen, enableCobbleToMossy, useMySQL, cocoabeans, mushrooms, @@ -40,9 +40,9 @@ public class LoadProperties msugar, mpumpkin, mwheat, mgold, mdiamond, miron, mredstone, mlapis, mobsidian, mnetherrack, mglowstone, mcoal, mstone, MySQLport, xpGainMultiplier, superBreakerCooldown, greenTerraCooldown, gigaDrillBreakerCooldown, treeFellerCooldown, berserkCooldown, serratedStrikeCooldown, skullSplitterCooldown, abilityDurabilityLoss, - feathersConsumedByChimaeraWing, repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond; + feathersConsumedByChimaeraWing, bonesConsumedByCOTW, repairdiamondlevel, rWood, rStone, rIron, rGold, rDiamond; - public static double xpbackground_r, xpbackground_g, xpbackground_b, xpborder_r, xpborder_g, xpborder_b, acrobatics_r, acrobatics_g, acrobatics_b, archery_r, archery_g, archery_b, axes_r, axes_g, axes_b, + public static double xpbackground_r, xpbackground_g, xpbackground_b, xpborder_r, xpborder_g, xpborder_b, fishing_r, fishing_g, fishing_b, acrobatics_r, acrobatics_g, acrobatics_b, archery_r, archery_g, archery_b, axes_r, axes_g, axes_b, excavation_r, excavation_g, excavation_b, herbalism_r, herbalism_g, herbalism_b, mining_r, mining_g, mining_b, repair_r, repair_g, repair_b, swords_r, swords_g, swords_b, taming_r, taming_g, taming_b, unarmed_r, unarmed_g, unarmed_b, woodcutting_r, woodcutting_g, woodcutting_b, pvpxprewardmodifier, tamingxpmodifier, miningxpmodifier, @@ -174,6 +174,9 @@ public class LoadProperties write("Spout.HUD.Retro.Colors.Woodcutting.RED", 0.3); write("Spout.HUD.Retro.Colors.Woodcutting.GREEN", 0.3); write("Spout.HUD.Retro.Colors.Woodcutting.BLUE", 0.75); + write("Spout.HUD.Retro.Colors.Fishing.RED", 0.3); + write("Spout.HUD.Retro.Colors.Fishing.GREEN", 0.3); + write("Spout.HUD.Retro.Colors.Fishing.BLUE", 0.75); write("Spout.HUD.Retro.Colors.Border.RED", 0.0); write("Spout.HUD.Retro.Colors.Border.GREEN", 0.0); write("Spout.HUD.Retro.Colors.Border.BLUE", 0.0); @@ -322,6 +325,8 @@ public class LoadProperties write("Abilities.Cooldowns.Berserk", 240); write("Abilities.Cooldowns.Serrated_Strikes", 240); write("Abilities.Cooldowns.Skull_Splitter", 240); + write("Abilities.Messages", true); + write("Abilities.Enabled", true); write("Skills.Repair.Anvil_Messages", true); write("Skills.Repair.Gold.ID", 266); @@ -339,6 +344,7 @@ public class LoadProperties write("Skills.Excavation.Requires_Shovel", true); write("Skills.Mining.Requires_Pickaxe", true); write("Skills.Woodcutting.Requires_Axe", true); + write("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); loadkeys(); } @@ -356,9 +362,14 @@ public class LoadProperties } } + enableAbilityMessages = readBoolean("Abilities.Messages", true); + enableAbilities = readBoolean("Abilities.Enabled", true); + donateMessage = readBoolean("Commands.mcmmo.Donate_Message", true); xpGainsMobSpawners = readBoolean("XP.Gains.Mobspawners.Enabled", false); + bonesConsumedByCOTW = readInteger("Skills.Taming.Call_Of_The_Wild.Bones_Required", 10); + xpbar = readBoolean("Spout.XP.Bar.Enabled", true); //web_url = readString("Spout.Images.URL_DIR", "http://mcmmo.rycochet.net/mcmmo/"); xpicon = readBoolean("Spout.XP.Icon.Enabled", true); @@ -404,6 +415,9 @@ public class LoadProperties woodcutting_r = readDouble("Spout.HUD.Retro.Colors.Woodcutting.RED", 0.3); woodcutting_g = readDouble("Spout.HUD.Retro.Colors.Woodcutting.GREEN", 0.3); woodcutting_b = readDouble("Spout.HUD.Retro.Colors.Woodcutting.BLUE", 0.75); + fishing_r = readDouble("Spout.HUD.Retro.Colors.Fishing.RED", 0.3); + fishing_g = readDouble("Spout.HUD.Retro.Colors.Fishing.GREEN", 0.3); + fishing_b = readDouble("Spout.HUD.Retro.Colors.Fishing.BLUE", 0.75); xpborder_r = readDouble("Spout.HUD.Retro.Colors.Border.RED", 0.0); xpborder_g = readDouble("Spout.HUD.Retro.Colors.Border.GREEN", 0.0); diff --git a/src/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/com/gmail/nossr50/listeners/mcPlayerListener.java index 77a27c5c6..76011415d 100644 --- a/src/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -27,7 +27,7 @@ import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.craftbukkit.command.ColouredConsoleSender; import org.bukkit.craftbukkit.entity.CraftItem; -import org.bukkit.entity.AnimalTamer; +import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.CreatureType; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; @@ -62,7 +62,6 @@ import com.gmail.nossr50.skills.Fishing; import com.gmail.nossr50.skills.Herbalism; import com.gmail.nossr50.skills.Repair; import com.gmail.nossr50.skills.Skills; -import com.gmail.nossr50.skills.Taming; public class mcPlayerListener extends PlayerListener @@ -191,10 +190,11 @@ public class mcPlayerListener extends PlayerListener if(block != null && player != null && mcPermissions.getInstance().repair(player) && event.getClickedBlock().getTypeId() == 42) { + event.setCancelled(true);//This is a fix for the sword repair bug Repair.repairCheck(player, is, event.getClickedBlock()); } - if(m.abilityBlockCheck(block)) + if(LoadProperties.enableAbilities && m.abilityBlockCheck(block)) { if(block != null && m.isHoe(player.getItemInHand()) && block.getTypeId() != 3 && block.getTypeId() != 2 && block.getTypeId() != 60){ Skills.hoeReadinessCheck(player); @@ -240,7 +240,7 @@ public class mcPlayerListener extends PlayerListener return; } } - if(action == Action.RIGHT_CLICK_AIR) + if(LoadProperties.enableAbilities && action == Action.RIGHT_CLICK_AIR) { Skills.hoeReadinessCheck(player); Skills.abilityActivationCheck(player); @@ -275,9 +275,9 @@ public class mcPlayerListener extends PlayerListener ItemStack[] inventory = player.getInventory().getContents(); for(ItemStack x : inventory){ if(x != null && x.getType() == Material.BONE){ - if(x.getAmount() >= 10) + if(x.getAmount() >= LoadProperties.bonesConsumedByCOTW) { - x.setAmount(x.getAmount() - 10); + x.setAmount(x.getAmount() - LoadProperties.bonesConsumedByCOTW); player.getInventory().setContents(inventory); player.updateInventory(); break; diff --git a/src/com/gmail/nossr50/locale/locale_de.properties b/src/com/gmail/nossr50/locale/locale_de.properties index 7a2d01b2e..bf8acf5cf 100644 --- a/src/com/gmail/nossr50/locale/locale_de.properties +++ b/src/com/gmail/nossr50/locale/locale_de.properties @@ -393,4 +393,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/locale/locale_en_us.properties b/src/com/gmail/nossr50/locale/locale_en_us.properties index 93d513c42..5fdb5bed2 100644 --- a/src/com/gmail/nossr50/locale/locale_en_us.properties +++ b/src/com/gmail/nossr50/locale/locale_en_us.properties @@ -387,4 +387,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/locale/locale_es_es.properties b/src/com/gmail/nossr50/locale/locale_es_es.properties index 7b03fffbb..077fa87bc 100644 --- a/src/com/gmail/nossr50/locale/locale_es_es.properties +++ b/src/com/gmail/nossr50/locale/locale_es_es.properties @@ -387,4 +387,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/locale/locale_fi.properties b/src/com/gmail/nossr50/locale/locale_fi.properties index 79d7d4b05..290f0afd3 100644 --- a/src/com/gmail/nossr50/locale/locale_fi.properties +++ b/src/com/gmail/nossr50/locale/locale_fi.properties @@ -366,4 +366,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/locale/locale_fr.properties b/src/com/gmail/nossr50/locale/locale_fr.properties index 350e2e3ea..2ab284cf0 100644 --- a/src/com/gmail/nossr50/locale/locale_fr.properties +++ b/src/com/gmail/nossr50/locale/locale_fr.properties @@ -387,4 +387,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/locale/locale_nl.properties b/src/com/gmail/nossr50/locale/locale_nl.properties index 6d3151cea..e88df5a39 100644 --- a/src/com/gmail/nossr50/locale/locale_nl.properties +++ b/src/com/gmail/nossr50/locale/locale_nl.properties @@ -393,4 +393,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/locale/locale_pl.properties b/src/com/gmail/nossr50/locale/locale_pl.properties index 83130b169..d4cafca5e 100644 --- a/src/com/gmail/nossr50/locale/locale_pl.properties +++ b/src/com/gmail/nossr50/locale/locale_pl.properties @@ -387,4 +387,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/locale/locale_pt_br.properties b/src/com/gmail/nossr50/locale/locale_pt_br.properties index e276c58c3..3e84442fe 100644 --- a/src/com/gmail/nossr50/locale/locale_pt_br.properties +++ b/src/com/gmail/nossr50/locale/locale_pt_br.properties @@ -401,4 +401,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/locale/locale_ru.properties b/src/com/gmail/nossr50/locale/locale_ru.properties index 716c045e6..842e64821 100644 --- a/src/com/gmail/nossr50/locale/locale_ru.properties +++ b/src/com/gmail/nossr50/locale/locale_ru.properties @@ -379,4 +379,4 @@ m.TamingSummon=[[GREEN]]Summoning complete m.TamingSummonFailed=[[RED]]You have too many wolves nearby to summon any more. m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side -m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with 10 Bones in hand \ No newline at end of file +m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand \ No newline at end of file diff --git a/src/com/gmail/nossr50/mcMMO.java b/src/com/gmail/nossr50/mcMMO.java index b0404f24c..b34277cdb 100644 --- a/src/com/gmail/nossr50/mcMMO.java +++ b/src/com/gmail/nossr50/mcMMO.java @@ -153,6 +153,21 @@ public class mcMMO extends JavaPlugin pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this); pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Monitor, this); pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this); + + PluginDescriptionFile pdfFile = this.getDescription(); + mcPermissions.initialize(getServer()); + + if(LoadProperties.useMySQL) + { + database = new Database(this); + database.createStructure(); + } else + Leaderboard.makeLeaderboards(); //Make the leaderboards + + for(Player player : getServer().getOnlinePlayers()){Users.addUser(player);} //In case of reload add all users back into PlayerProfile + System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" ); + + Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, mcMMO_Timer, 0, 20); //Spout Stuff if(LoadProperties.spoutEnabled) @@ -175,21 +190,6 @@ public class mcMMO extends JavaPlugin }, 20, 20); */ } - - PluginDescriptionFile pdfFile = this.getDescription(); - mcPermissions.initialize(getServer()); - - if(LoadProperties.useMySQL) - { - database = new Database(this); - database.createStructure(); - } else - Leaderboard.makeLeaderboards(); //Make the leaderboards - - for(Player player : getServer().getOnlinePlayers()){Users.addUser(player);} //In case of reload add all users back into PlayerProfile - System.out.println(pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" ); - - Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, mcMMO_Timer, 0, 20); } public PlayerProfile getPlayerProfile(Player player) diff --git a/src/com/gmail/nossr50/skills/Repair.java b/src/com/gmail/nossr50/skills/Repair.java index 47b1ca2ac..4be67e804 100644 --- a/src/com/gmail/nossr50/skills/Repair.java +++ b/src/com/gmail/nossr50/skills/Repair.java @@ -17,12 +17,10 @@ package com.gmail.nossr50.skills; import org.bukkit.ChatColor; -import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; - import com.gmail.nossr50.Users; import com.gmail.nossr50.m; import com.gmail.nossr50.mcPermissions; @@ -50,7 +48,6 @@ public class Repair { private static String nIron = LoadProperties.nIron; - @SuppressWarnings("deprecation") public static void repairCheck(Player player, ItemStack is, Block block){ PlayerProfile PP = Users.getProfile(player); short durabilityBefore = player.getItemInHand().getDurability(); @@ -69,7 +66,11 @@ public class Repair { pos++; } - if(block != null && mcPermissions.getInstance().repair(player)){ + if(block != null && mcPermissions.getInstance().repair(player)) + { + //Handle the enchantments + addEnchants(player.getItemInHand(), enchants, enchantsLevel, PP, player); + if(player.getItemInHand().getDurability() > 0 && player.getItemInHand().getAmount() < 2){ /* * ARMOR @@ -130,14 +131,6 @@ public class Repair { * TOOLS */ if(isTools(is)){ - if(is.getType() == Material.WOOD_SWORD || is.getType() == Material.STONE_SWORD || is.getType() == Material.IRON_SWORD || - is.getType() == Material.GOLD_SWORD || is.getType() == Material.DIAMOND_SWORD) - { - player.sendMessage(ChatColor.GOLD+"[mcMMO] "+ChatColor.GREEN+"Sorry this is disabled due to a bug"); - player.sendMessage(ChatColor.GREEN+" with changing the durability of swords in CB"); - return; - } - if(isStoneTools(is) && hasItem(player, rStone)){ removeItem(player, rStone); /* @@ -145,7 +138,6 @@ public class Repair { */ player.getItemInHand().setDurability(getRepairAmount(is, player)); - durabilityAfter = player.getItemInHand().getDurability(); dif = (short) (durabilityBefore - durabilityAfter); if(m.isShovel(is)) @@ -238,26 +230,16 @@ public class Repair { } else { needMoreVespeneGas(is, player); } - - //This will solve the issue with swords not repairing properly - if(is.getType() == Material.WOOD_SWORD || is.getType() == Material.STONE_SWORD || is.getType() == Material.IRON_SWORD || - is.getType() == Material.GOLD_SWORD || is.getType() == Material.DIAMOND_SWORD) - { - player.getItemInHand().getData().setData((byte)player.getItemInHand().getDurability()); - } - - player.sendMessage("Current Durability Value: "+player.getItemInHand().getDurability()); } } else { player.sendMessage(mcLocale.getString("Skills.FullDurability")); } - player.updateInventory(); + //player.updateInventory(); /* * GIVE SKILL IF THERE IS ENOUGH XP */ Skills.XpCheckSkill(SkillType.REPAIR, player); - addEnchants(player.getItemInHand(), enchants, enchantsLevel, PP, player); } } public static int getArcaneForgingRank(PlayerProfile PP) @@ -290,6 +272,10 @@ public class Repair { if(rank == 0) { player.sendMessage(mcLocale.getString("Repair.LostEnchants")); + for(Enchantment x : enchants) + { + is.removeEnchantment(x); + } return; } @@ -298,8 +284,7 @@ public class Repair { for(Enchantment x : enchants) { //Remove enchant - if(is.getEnchantments().containsKey(x)) - is.removeEnchantment(x); + is.removeEnchantment(x); if(x.canEnchantItem(is)) { @@ -320,7 +305,7 @@ public class Repair { is.addEnchantment(x, enchantsLvl[pos]); } } else { - failure = true; + failure = true; } } pos++; @@ -330,10 +315,10 @@ public class Repair { { player.sendMessage(mcLocale.getString("Repair.ArcanePerfect")); } else { - if(failure == false) - player.sendMessage("Repair.ArcaneFailed"); - if(downgrade == false) - player.sendMessage("Repair.Downgraded"); + if(failure == true) + player.sendMessage(mcLocale.getString("Repair.ArcaneFailed")); + if(downgrade == true) + player.sendMessage(mcLocale.getString("Repair.Downgraded")); } } public static int getEnchantChance(int rank) diff --git a/src/com/gmail/nossr50/skills/Skills.java b/src/com/gmail/nossr50/skills/Skills.java index 431ffc274..70090ac4e 100644 --- a/src/com/gmail/nossr50/skills/Skills.java +++ b/src/com/gmail/nossr50/skills/Skills.java @@ -115,7 +115,8 @@ public class Skills +ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getGreenTerraDeactivatedTimeStamp()*1000), LoadProperties.greenTerraCooldown)+"s)"); return; } - player.sendMessage(mcLocale.getString("Skills.ReadyHoe")); + if(LoadProperties.enableAbilityMessages) + player.sendMessage(mcLocale.getString("Skills.ReadyHoe")); PP.setHoePreparationATS(System.currentTimeMillis()); PP.setHoePreparationMode(true); } @@ -236,7 +237,8 @@ public class Skills +ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getSuperBreakerDeactivatedTimeStamp()*1000), LoadProperties.superBreakerCooldown)+"s)"); return; } - player.sendMessage(mcLocale.getString("Skills.ReadyPickAxe")); + if(LoadProperties.enableAbilityMessages) + player.sendMessage(mcLocale.getString("Skills.ReadyPickAxe")); PP.setPickaxePreparationATS(System.currentTimeMillis()); PP.setPickaxePreparationMode(true); } @@ -248,7 +250,8 @@ public class Skills +ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getGigaDrillBreakerDeactivatedTimeStamp()*1000), LoadProperties.gigaDrillBreakerCooldown)+"s)"); return; } - player.sendMessage(mcLocale.getString("Skills.ReadyShovel")); + if(LoadProperties.enableAbilityMessages) + player.sendMessage(mcLocale.getString("Skills.ReadyShovel")); PP.setShovelPreparationATS(System.currentTimeMillis()); PP.setShovelPreparationMode(true); } @@ -260,7 +263,8 @@ public class Skills +ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getSerratedStrikesDeactivatedTimeStamp()*1000), LoadProperties.serratedStrikeCooldown)+"s)"); return; } - player.sendMessage(mcLocale.getString("Skills.ReadySword")); + if(LoadProperties.enableAbilityMessages) + player.sendMessage(mcLocale.getString("Skills.ReadySword")); PP.setSwordsPreparationATS(System.currentTimeMillis()); PP.setSwordsPreparationMode(true); } @@ -272,7 +276,8 @@ public class Skills +ChatColor.YELLOW+" ("+calculateTimeLeft(player, (PP.getBerserkDeactivatedTimeStamp()*1000), LoadProperties.berserkCooldown)+"s)"); return; } - player.sendMessage(mcLocale.getString("Skills.ReadyFists")); + if(LoadProperties.enableAbilityMessages) + player.sendMessage(mcLocale.getString("Skills.ReadyFists")); PP.setFistsPreparationATS(System.currentTimeMillis()); PP.setFistsPreparationMode(true); } @@ -280,7 +285,8 @@ public class Skills { if(m.isAxes(player.getItemInHand())) { - player.sendMessage(mcLocale.getString("Skills.ReadyAxe")); + if(LoadProperties.enableAbilityMessages) + player.sendMessage(mcLocale.getString("Skills.ReadyAxe")); PP.setAxePreparationATS(System.currentTimeMillis()); PP.setAxePreparationMode(true); } diff --git a/src/com/gmail/nossr50/spout/SpoutStuff.java b/src/com/gmail/nossr50/spout/SpoutStuff.java index 5f5fd024c..6f81d995b 100644 --- a/src/com/gmail/nossr50/spout/SpoutStuff.java +++ b/src/com/gmail/nossr50/spout/SpoutStuff.java @@ -64,7 +64,6 @@ public class SpoutStuff private final static mcSpoutScreenListener spoutScreenListener = new mcSpoutScreenListener(plugin); public static HashMap playerHUDs = new HashMap(); - //public static HashMap> partyHealthBars = new HashMap>(); public static HashMap playerScreens = new HashMap(); public static Keyboard keypress; @@ -128,10 +127,9 @@ public class SpoutStuff for(SkillType y : SkillType.values()) { - if(y == SkillType.ALL) + if(y == SkillType.ALL || y == SkillType.ENCHANTING || y == SkillType.ALCHEMY) continue; - String theFileNameA = m.getCapitalized(y.toString())+".png"; String theFileNameB = m.getCapitalized(y.toString())+"_r.png"; @@ -193,7 +191,7 @@ public class SpoutStuff //Standard XP Icons for(SkillType y : SkillType.values()) { - if(y == SkillType.ALL) + if(y == SkillType.ALL || y == SkillType.ENCHANTING || y == SkillType.ALCHEMY) continue; files.add(new File(dir+"HUD/Standard/"+m.getCapitalized(y.toString())+".png")); files.add(new File(dir+"HUD/Retro/"+m.getCapitalized(y.toString())+"_r.png")); @@ -242,6 +240,8 @@ public class SpoutStuff return new Color((float)LoadProperties.unarmed_r, (float)LoadProperties.unarmed_g, (float)LoadProperties.unarmed_b, 1f); case WOODCUTTING: return new Color((float)LoadProperties.woodcutting_r, (float)LoadProperties.woodcutting_g, (float)LoadProperties.woodcutting_b, 1f); + case FISHING: + return new Color((float)LoadProperties.fishing_r, (float)LoadProperties.fishing_g, (float)LoadProperties.fishing_b, 1f); default: return new Color(0.3f, 0.3f, 0.75f, 1f); } @@ -490,6 +490,25 @@ public class SpoutStuff break; } break; + case FISHING: + switch(getNotificationTier(PP.getSkillLevel(skillType))) + { + case 1: + mat = Material.RAW_FISH; + break; + case 2: + mat = Material.RAW_FISH; + break; + case 3: + mat = Material.COOKED_FISH; + break; + case 4: + mat = Material.COOKED_FISH; + break; + case 5: + mat = Material.FISHING_ROD; + break; + } default: mat = Material.WATCH; break; diff --git a/src/plugin.yml b/src/plugin.yml index 67578a97b..184b0de94 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: mcMMO main: com.gmail.nossr50.mcMMO -version: 1.2.00 +version: 1.2.01 softdepend: [Spout] author: nossr50 description: mcMMO takes core Minecraft game mechanics and expands them to add an extensive RPG experience, the goal of the project has always been a quality RPG experience. Everything in mcMMO is carefully thought out and is constantly improving. mcMMO adds eleven skills to train in and level in, while also offering a high level of customization for server admins. There are countless features, including custom sounds, graphical elements, and more added when running mcMMO in conjunction with Spout. I carefully read feedback and evaluate the mechanics of mcMMO in every update to provide an ever-evolving experience. diff --git a/src/resources/Fishing.png b/src/resources/Fishing.png new file mode 100644 index 0000000000000000000000000000000000000000..bf277c808456bc7e5d8509195d0353874556606a GIT binary patch literal 3116 zcmV+{4Ab+8P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ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